Henry, The HTML document object model is extremely complex...hundreds of classes with thousands of methods, properties and events...and we do our best to protect you from it. But, sometimes it's necessary to use them.
Our approach for this is much like the rest of Boston WorkStation...try to figure it out and call us if you need help. References can be found in one of those big computer references in the bookstore or on Microsoft.com, for example the innerHTML property is at: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/r eference/ifaces/ihtmlelement/innerhtml.asp Rich McNeil Boston Software Systems 866 653 5105 www.bostonworkstation.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, July 26, 2004 8:11 AM To: [EMAIL PROTECTED] Subject: RE: [Talk] Drop down boxes on web pages This worked. I'm curious about the properties and methods you used, though. Are those documented somewhere? I sure didn't see them in the Online Documentation. But then, I for sure could have missed them. Henry Taylor Technical Analyst II Lutheran Health Network Ph. (260) 425-3914 |--------+--------------------------------> | | "Thom C. Blackwell" | | | <[EMAIL PROTECTED]> | | | Sent by: | | | [EMAIL PROTECTED]| | | TATION.COM | | | | | | | | | 07/24/2004 08:15 AM | | | Please respond to Talk| | | | |--------+--------------------------------> >--------------------------------------------------------------------------- --------------------------------| | | | To: <[EMAIL PROTECTED]> | | cc: | | Subject: RE: [Talk] Drop down boxes on web pages | >--------------------------------------------------------------------------- --------------------------------| Greetings, I am going to make an assumption here that you are talking about an "HTML" dropdown as opposed to Flash or something else type dropdown - let me know if you have to address something along these lines - the approach needed may be different. Below is an example script that illustrates finding a particular item in a list. I made the "part that does the selecting" a generic sub routine so you could reuse it to find other items at will. (This will also be posted to the script center on Monday). To use this code, first have a Pause command for the dropdown. This is very important; reason being is that the Pause sets Web.Selected to the dropdown - without the pause, this will not work! The loop then scans through available dropdown options until it finds and sets the dropdown to the one you are looking for. Here's the example - say you wanted to shop for Toys on Amazon.com, you'd use the following: Sub test() Connect "", stWeb Go_ "amazon.com" 'Here's my Pause for the dropdown Pause " All ProductsBooksPopular Musi*<SELECT>[EMAIL PROTECTED]: Welcome" GetListItem "Toys" Click "Go<INPUT>[EMAIL PROTECTED]: Welcome" End Sub 'Here's the part that really does the work Sub GetListItem(ItemName As String) Set e = Web.Selected For i = 0 To e.options.length If ItemName = e.options(i).innerHTML Then e.selectedIndex = i 'The Go command is optional - use if the act of selecting an item is 'designed to navigate to another page, do not use if you are just selecting 'a value and clicking on a button or similar 'Go_ e.options(i).Value Exit Sub End If Next i End Sub Hope this helps - any questions? Regards and happy scripting! Thom Thom C. Blackwell Product Manager Boston Software Systems 866.653.5105
