PDA

View Full Version : Multiple Dropdown lists


Paul Rochester
08-26-2005, 02:40 AM
I need to figure out how to populate a second dropdown control from the value in the first. The dropdown controls are for start and end times (24 hour clock) and the second dropdown values MUST NOT be earlier than the value set in the first dropdown + 30 minutes. I will also need to ensure the reverse, that is, if the user sets dropdown 2 first, that dropdown 1 cannot contain values greater than dropdown 2 value - 30 minutes. VBScript or Javascript without postback is required. Any help would be greatly appreciated.

Bullschmidt
08-30-2005, 02:41 PM
Hi Paul (nice name by the way) and welcome to the board!

Perhaps these JavaScript solutions could give you some ideas:

Universal Related Popup Menus v 2.02
http://webreference.com/dev/menus/
Initially sends all data to the page and then lets JavaScript populate the second list box.
Has demo.

Cheap Tricks 2: A Dynamically-Linked Listbox
http://www.atgconsulting.com/doublelist.asp
Initially sends all data to the page and then lets JavaScript populate the second list box.
Says it has some unresolved Netscape (apparently the old Netscape browser) quirks.
Has demo.
And similar but better one (improved code and 3 select boxes):
Cheap Tricks 4: A Triple-Linked Listbox
http://www.atgconsulting.com/triplelist.asp