Hi there folks,
What do I do if a want a list of all the countries in the world loaded up into a html dropdown listbox.
Thanks for the help in advance

Recommended Answers

All 6 Replies

Personnaly I would setup a database of all the countries, than load all the countries out of the database and put them into the dropdown box. Would make the code look neater, as well if you use it on several pages the list of countires would be centralized, than you would not have change several codes to add/remove any countries you may have missed. just add/remove it to the database.

I'm sure there are many pages which will list all of the countries in the world.

There may be an easier way to do this, but that is the approach I would use.

Yes, I agree, but the challenge is actually knowing and/or remembering all the countries resident on planet earth;) . I had seen the list so many times and they are all identical - if you know what i mean - that I thought maybe there is one central point where everybody goes to get the same list. Thanks for the insight though:cool:

Personnaly I would setup a database of all the countries, than load all the countries out of the database and put them into the dropdown box. Would make the code look neater, as well if you use it on several pages the list of countires would be centralized, than you would not have change several codes to add/remove any countries you may have missed. just add/remove it to the database.

I'm sure there are many pages which will list all of the countries in the world.

There may be an easier way to do this, but that is the approach I would use.

Dave, You did it for me. :cool: Thanks

You're going to have to source the list from somewhere, ideally this would be a web service, but I haven't managed to find one yet :(

edit - drat, beaten to it!

edit again - found this one

http://www.webservicex.net/WS/WSDetails.aspx?WSID=17&CATID=7

Different authorities quote different numbers, from 189 to 194.

The UN has 192 members. But the Vatican refused to join, and the UN considers Taiwan to be a province of China, and won't let it join.

The 194 above don't include areas such as Palestine, Western Sahara, Puerto Rico, and England, which are territories or states in larger countries.

Different authorities quote different numbers, from 189 to 194.

The UN has 192 members. But the Vatican refused to join, and the UN considers Taiwan to be a province of China, and won't let it join.

The 194 above don't include areas such as Palestine, Western Sahara, Puerto Rico, and England, which are territories or states in larger countries.

Thanks for the insight MidiMagic, That was a bit to think about.:-/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.