Webmaster Forum

Go Back   Webmaster Forum > Scripting/Programming & Debugging > ASP & VBScript Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-29-2008, 08:53 PM
ecmoore12 ecmoore12 is offline
Junior Member
 
Join Date: Jan 2008
Posts: 1
ecmoore12 is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default Retrieve Info From Form on HTML Page

Hello,
I have a form that contains a combo box. When the user selects an item from the combo box and clicks a button, I need to use the value selected in the combo box to perform a search. For example, if someone selects NM I need the code to search for the existence of NM on the network. If the document is found, then a link to that document will appear on a separate web page. Here is what I have so far:

Dim objFSO
Dim oFolder
Dim objStream

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objStream = objFSO.createtextfile("K:\orkand\DAEBTools\TSASear ch.htm",True)
CheckFolder (objFSO.getfolder("I:\cabinets\tsb\tsareport\")),o bjStream

Sub CheckFolder(objCurrentFolder,objLogFile)
Dim strSearch
Dim strTemp
Dim strOutput
Dim objNewFolder
Dim objFile
Dim objStream
Dim x



set x=document.getElementbyID("State").value
For Each objFile In objCurrentFolder.Files
strTemp=Mid(objFile.Name,6,2)


If x = strTemp Then
strOutput = "<A href=" & CStr(objFile.Path) & ">" & CStr(objFile.Path) & "</A>"
objLogFile.writeline strOutput
Set Sh = WScript.CreateObject("WScript.Shell")
Sh.Run "K:\orkand\daebtools\tsasearch.htm", 3
End If
Next

For each objNewFolder In objCurrentFolder.subFolders
CheckFolder objNewFolder, objLogFile
Next
End Sub


After running this code I receive the following error message:
Object required: 'document'

The error refers to the following line in my code: set x=document.getElementbyID("State").value

Any help would be greatly appreciated.

...ecmoore12
Reply With Quote

This ad is part of our Revenue Sharing program
  #2 (permalink)  
Old 02-06-2008, 07:07 PM
ALL's Avatar
ALL ALL is offline
Senior Member
 
Join Date: Oct 2006
Location: Sturgis, SD
Posts: 145
ALL is on a distinguished road
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default

that is because it's... document.getElementById.

Case does matter...

change that line to:
set x=document.getElementbyId("State").value
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML & VBScript none All other Scripting/Programming items 0 10-19-2007 03:47 PM
retrieve empolyee ID from Active Directory VBS bghanim ASP & VBScript Forum 6 08-17-2007 07:42 PM
Directory domain name .com or .info Lovely General Web/Webmaster Forum 2 05-30-2007 08:56 AM
PHP Email form help Brancoady PHP Forum 7 05-24-2007 08:00 AM
finding certain text in html page+vbsript sharjeel ASP & VBScript Forum 1 05-15-2007 02:26 PM


All times are GMT. The time now is 05:39 AM.


Creative Commons License
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30