Forum Moderators: open
I have 2 dropdown boxes. The value of the first one determines the values of the 2nd. Example: States and Cities.
So when a user selects a state from the first dropdown, the appropriate cities are populated in the second dropdown.
What I would like to do, is populate the second dropdown using clientside code if the users browser can accept it, otherwise, get the info from the server.
I'm pretty sure the validation controls do something like this, but I was unable to find out how. I also searched the forums here, but couldn't find anything.
Avoiding the roundtrip to the server would help a lot.
Anyone know how to do this? or point me in the right direction?
If anyone wants to see the page I'm referring to it's <snip>
Thanks - Don
[edited by: engine at 5:41 pm (utc) on Mar. 19, 2005]
[edit reason] No urls, thanks. See TOS [webmasterworld.com] [/edit]
Another option is that you can call webservices via jscript so you could do that then parse the xmldocument that is returned and load the drop down list with cities. This would not require typical "round-trip" but would happen behind the scenes on the client side, but still accessing the server each time the 1st drop down is changed.