that someone out there on the net can help me out. I am using a merge
of ASP and JavaScript.
My goal is to create 2 drop down lists. Both are populated from a
database using ASP, BUT the contents of the second list are dependant
on the selection of the first list. When the user selects the state in
the first list, then only the cities which reside in that state are
displayed in the second dropdown list.
I have this working to a point using the JavaScript command:
document.frmRegistration.cityName.options[0] = new Option("Perth");
The problem with this is that although it adds a display value, each
state has a stateID, which also needs to be included. In essence, the
line of code above, does this: <option>Perth</option>
What I need it to do is this: <option value="1">Perth</option>
How do I get the 'value' field to insert using javascript ?!?!?!?!
If anyone here knows, please PLEASE let me know... otherwise point me
in the right direction.
Thanks