Hello;
I never coded in javascript but I taught myself perl through books and tutorials and found many similarities.
This helped me modify a free downloadable javascript snippet of code from a website and do the nessessary changes to adapt it to my needs.
http://javascript.inte rnet.com/forms/country-state-drop-down.html
I need a drop down menu for a registration form where people select states from a menu and automatically will load cities from that state in the following drop down menu.
Well.. the script I found does the same thing except instead of selecting a state to find a city it shows how to select a country to find a state.
What I added on my own is placing a country drop down menu above it to have the option of selecting the following:
1) El Salvador (where I live)
2) USA
3) Any other country
The default value is to load El Salvador with its states and cities.
When one selects OTHER COUNTRIES, I made vanish the drop down menues and present fields for people to write their own details.
Same happens when they select USA, Except is adds a Zip Code field that doenst show for OTHER COUNTRIES.
All of that looks and works wondeful except when from the fields display for OTHER COUNTRIES or USA people go back to El Salvador.
I made the fields vanish OK but when trying to display the States and Cities again it doenst find the DEFAULT STATE to display. (I thought line 311 would take care of it but it didnt).
Plaese download my work of art and change the extention from .txt to .html to see how it works and see the sourse for the complete script.
If you know what Im lacking please let me know..
Best regards
I never coded in javascript but I taught myself perl through books and tutorials and found many similarities.
This helped me modify a free downloadable javascript snippet of code from a website and do the nessessary changes to adapt it to my needs.
http://javascript.inte rnet.com/forms/country-state-drop-down.html
I need a drop down menu for a registration form where people select states from a menu and automatically will load cities from that state in the following drop down menu.
Well.. the script I found does the same thing except instead of selecting a state to find a city it shows how to select a country to find a state.
What I added on my own is placing a country drop down menu above it to have the option of selecting the following:
1) El Salvador (where I live)
2) USA
3) Any other country
The default value is to load El Salvador with its states and cities.
When one selects OTHER COUNTRIES, I made vanish the drop down menues and present fields for people to write their own details.
Same happens when they select USA, Except is adds a Zip Code field that doenst show for OTHER COUNTRIES.
All of that looks and works wondeful except when from the fields display for OTHER COUNTRIES or USA people go back to El Salvador.
I made the fields vanish OK but when trying to display the States and Cities again it doenst find the DEFAULT STATE to display. (I thought line 311 would take care of it but it didnt).
Plaese download my work of art and change the extention from .txt to .html to see how it works and see the sourse for the complete script.
If you know what Im lacking please let me know..
Best regards