Following a post on an Internet forum, here is a small expansion on my Country / State dropdown selection script to enable a third level drop down. This additional level would allow for a country / state / city drop down selection on an XML file as apposed to just a country / state drop down selection.
[UPDATE] Comments are closed on this topic – Should you spot any mistakes or if I have missed a province/state – please email me at michael [at] darwinshome [dot] za [dot] net
I have been looking all over the Internet for an AJAX or similar dynamic drop down tool for Country and Province/State selection (You select a country from a drop down list and the country/state drop down selection automatically populates with that countries list of provinces or states)
So after much trawling, and searching, IÂ have a complete world country list (including Antarctica) with their respective states and I have placed them all together into an XML file for ease of development use:
– Country State/Province XML lis (2148) - [29.3 KB ZIP file]
Please leave a comment should any errors exist in the file, from broken XML, to incorrect spelling, to having a province not listed, I will fix it if it checks out.
Hope it helps.
[EDIT1 11/03/2008] – Removed Yugoslavia. Changed “Macedonia, Former Yugoslav Republic of” to “Macedonia”. Added Serbia and Montenagro, with states. Thank you omBRE for pointing out my error on the NoBox Media blog.
[EDIT2 24/04/2008] – Corrected spelling of Antarctica (Thanks Ryan) and updated the “Regions” in New Zealand (Thanks David for pointing that out over on the NoBox Media blog).
[EDIT2 08/05/2008] – Corrected spelling of Czech Republic, Thanks Tim.
License and Copyright:
The country and province names in the file are public domain.
XML file in its current format is licensed to Michael John Grove under the Creative Commons Attribution 2.5 South Africa License.