![]() |
|
|||||||
| ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
|
This ad is part of our Revenue Sharing program |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |