Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Customizing dynamic select boxes
12-10-2009, 12:47 PM #1
- Join Date
- Sep 2008
- Thanked 3 Times in 3 Posts
Customizing dynamic select boxes
I'm trying to customize a script I found. It's about two select boxes, one for continent selection and one for country selection. When user selects a continent from the first select box, the second select box is filled with the list of the proper countries that belong to this continent.
You can see that code of the script here: http://www.howtocreate.co.uk/jslibs/htmlhigh/countryselect.html
In my page, the continent select box is loaded with a continent-value already selected (the selection depends on a database value) and I want to have the second countries select box, also loaded with the proper countries.
I cannot make this happen, unless I change the continent's selection and trigger the onchange event. Can I someway keep the onchange event and also add the ability to have a continent and it's list of countries already loaded?
12-10-2009, 03:22 PM #2
- Join Date
- Apr 2003
- Bucharest, ROMANIA
- Thanked 379 Times in 375 Posts
can't you trigger that function onload? I see that the genuine code does that. What is going wrong? Can we have a link to a test page?