Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I access table option?

Status
Not open for further replies.

jackeroo75

Technical User
Aug 26, 2007
34
US

<select name="tableResults_length" aria-controls="tableResults" class="">
<option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select>


Above is the WEBPAGE CODE, but since it doesn't have getidbyid, I can't seemed to choose 100 as my value. See my vbscript below.

WScript.Quit Main

Function Main
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate " Wait IE
With IE.Document
.getElementByID("search-conditions").value = "BookedInLast24Hours"

.getElementByID("btnBrowse").click

.getElementsByName("tableResults_length")(0).selectedIndex = 2

End With

End Function

Sub Wait(IE)
Do

WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
End Sub

Sub IE_OnQuit
On Error Resume Next
WScript.StdErr.WriteLine "IE closed before script finished."
WScript.Quit
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top