User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,626 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,743 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 3341 | Replies: 6
Reply
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation: jamello is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Junior Poster

List Of countries in the world

  #1  
May 3rd, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2006
Location: Canada
Posts: 55
Reputation: GliderPilot is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
GliderPilot's Avatar
GliderPilot GliderPilot is offline Offline
Junior Poster in Training

Re: List Of countries in the world

  #2  
May 3rd, 2007
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.
Reply With Quote  
Join Date: Feb 2007
Location: London
Posts: 114
Reputation: davidcairns is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
davidcairns davidcairns is offline Offline
Junior Poster

Re: List Of countries in the world

  #3  
May 3rd, 2007
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/WSDeta...SID=17&CATID=7
Last edited by davidcairns : May 3rd, 2007 at 12:40 pm.
Reply With Quote  
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation: jamello is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Junior Poster

Re: List Of countries in the world

  #4  
May 3rd, 2007
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
Originally Posted by GliderPilot View Post
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.
Reply With Quote  
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation: jamello is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Junior Poster

Re: List Of countries in the world

  #5  
May 3rd, 2007
Dave, You did it for me. Thanks

Originally Posted by davidcairns View Post
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/WSDeta...SID=17&CATID=7
Reply With Quote  
Join Date: Jan 2007
Posts: 2,510
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 103
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: List Of countries in the world

  #6  
May 5th, 2007
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.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation: jamello is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Junior Poster

Re: List Of countries in the world

  #7  
May 14th, 2007
Originally Posted by MidiMagic View Post
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 12:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC