Dependent Web Drop Down Controls

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
aromero
Posts: 51
Joined: 01 Aug 2016, 11:53

Dependent Web Drop Down Controls

25 May 2018, 10:31

I have a web page in which the first drop down box selects a search type (user id, last name, first name, id number), then the second drop has search parameters (contains, is, is not, starts with, equals, etc). The first drop down controls what appears in the second drop down. For example, select id number in the first, and the second drop down only has equals, whereas if you select last name, the second drop down has contains, is, is not, starts with. I can use autohotkey to select an item in the first drop down, but the contents of the second drop down aren't updating. I tried the fireevent("onchange") but it doesn't seem to have any impact. Any ideas?

Code: Select all

wb.document.getElementsByClassName("advancedSearchField")[0].selectedIndex := 9  ; Switch to User ID
wb.document.getElementsByClassName("advancedSearchField")[0].FireEvent("OnChange")
wb.document.getElementsByClassName("advancedSearchOperator")[0].selectedIndex := 0  ; Switch to Is
aromero
Posts: 51
Joined: 01 Aug 2016, 11:53

Re: Dependent Web Drop Down Controls

29 May 2018, 12:18

Just wanted to see if anyone had any thoughts on why the FireEvent("OnChange") isn't triggering the dependent drop down lists to update? Is there a similar function I can try?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, ulysim and 315 guests