I need to do a quick and dirty 'Country' --> 'State' drop down relationship on a web form. I only am concerned with the states, provinces, and territories for USA and Canada, and this will be a relatively lightly used form, so a pure javascript solution is probably ideal.
views:
158answers:
1
+1
A:
Create a JSON array:
array = [ { name: "United States", states: [...] }, { ... } ];
When the value of the dropdown changes, fill in the other drop down with the contents of the particular element from the array.
Mehrdad Afshari
2009-01-22 21:48:19