Forum Moderators: open
I was wondering if anyone had any suggestions to my problem:
I have a site which has a drop down list displaying countries, when the user selects a country I use the "onchange" event to run some javascript code which then displays the "Counties/States" field with all the states for the selected country.
The method works fine, but due to the size of the file storing the states for the countries it takes way too long to download (it's about 4Mb) and obviously isn't a viable solution.
I was wondering, if you were in my siutation what method would you use to implement this?
Thanks,
BBB
Or you could use the XMLHttpRequest object, which allows your script to communicate with the server and get the requested data without loading a new page. It's the same technique as used in for example Google Suggest.
Just out of curiousity: where did you get the data of all states(/provinces?) and counties in the world?
[webmasterworld.com...]