I'm writing a script which connects to a Payer website.  One of the fields that 
I need to select is a drop-down field.  I've been able to find/write the code 
to select the appropriate item from the drop-down list using the selectedIndex 
property of the drop-down (code below), however it doesn't seem to trigger the 
OnChange JavaScript code that is setup on the control.  The OnChange event of 
the control runs some JavaScript code that is needed in order for my script to 
continue successfully.

So, does anyone have any suggestions for how to get the OnChange event to fire 
when picking the item within a drop-down control on a web page?

Thanks for any help anyone can provide.

Ryan Rush * OBS Development Specialist * IS Development
Providence Office Park * (503) 215-4441

Code Used to Select correct item within the drop-down
    ' Declare and get Web selected element
    Dim e As IHTMLelement
    Set e = Web1.Selected

    ' Loop through all SELECT element's options to find the matching one
    Dim i As Integer
    For i = 0 To e.options.length - 1

        ' Check if current item matches the one to find
        If e.options(i).innerHTML Like itemText Then

            ' Select the current item
            e.selectedIndex = i

            ' Navigate to item's URL value if parameter directs us to
            If clickElementOnFind Then Web1.Go_ e.options(i).Value

            ' Set return variable and exit for loop
            returnValue = True
            Exit For

        End If

    Next i

________________________________
This message is intended for the sole use of the addressee, and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If you are not the addressee you are hereby notified that you 
may not use, copy, disclose, or distribute to anyone the message or any 
information contained in the message. If you have received this message in 
error, please immediately advise the sender by reply email and delete this 
message.

---  To post a message to this list, send mail to: [email protected]    You are 
currently subscribed as: [email protected]    Unsubscribe in the 
customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx   

Reply via email to