Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > country select list

Reply
Thread Tools

country select list

 
 
Rob McAninch
Guest
Posts: n/a
 
      12-27-2005
dorayme>:
> In article <(E-Mail Removed)>,
> Rob McAninch <(E-Mail Removed)> wrote:
>
>
>>I question the usefulness of such drop down lists.


> Good point. it is helpful mostly to those who want to lie about
> their country and can't spell...


Of course if I want to lie about my country I'll just modify the
form. Or use the drop down list and choose an entirely bogus answer.

About the only time I can see a valid reason for asking someone to
choose a country is to either give them a map, directions, or ship
them something. In any of these cases you will be validating against
a known data set.

Better to let them use a text box for efficiency.

--
Rob McAninch
http://rock13.com
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      12-27-2005
Gazing into my crystal ball I observed "Leszek" <leszekt80
@poczta.onet.pl> writing in news:doguge$quq$(E-Mail Removed):

> Hi.
> Is it possible to make a select lst of all countries in the world?
> Is there a list of countries i could download and place it in my form?
>
> thanx
> Leszek
>
>


I use the ISO country codes in my database, and pull the country
name/codes from there <http://www.iso.org/iso/en/prods-
services/iso3166ma/02iso-3166-code-lists/list-en1.html>.

In addition to what others have said, if you are going to make a drop
down list of countries, and your users are usually in a specific country
(ie American Loyalty Card), then have that country as the first choice.

<select name="country">
<option value="">Select Country</option>
<option value="255">United States</option>
<!-- loop through the database here -->
</select>

You can also do some best guessing looking at the HTTP_ACCEPT_LANGUAGE.
That's what Google does in determining which interface to serve. For
instance, if your accept language is French, Google will serve pages in
French. Mind you, it's definately not fool proof.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-27-2005
Adrienne Boswell <(E-Mail Removed)> wrote:

> In addition to what others have said, if you are going to make a drop
> down list of countries, and your users are usually in a specific country
> (ie American Loyalty Card), then have that country as the first choice.


While that may sound natural, and may actually help at times, it will also
mislead people. If you take a quick look at a dropped-down menu, you probably
see that it's in alphabetic order, which is a natural expectation anyway.
Then you might be looking for United States somewhere between the Ukraine and
Uruguay, in vain.

> You can also do some best guessing looking at the HTTP_ACCEPT_LANGUAGE.


That would be foolish, really.

> That's what Google does in determining which interface to serve.


Google is known for its obscure, undocumented, and harmful trickery in
choosing the interface language according to various data.

> For instance, if your accept language is French, Google will serve pages in
> French. Mind you, it's definately not fool proof.


If only it did so (consistently), things would be better. The Accept-Language
header (that's it's name; the CGI interface transmogrifies it into
HTTP_ACCEPT_LANGUAGE) is meant exactly for that: for expressing the user's
linguistic preferences, for use when the server has the same content
available in two or more languages. Confusing it with country selection is
the start of infinite confusion and frustration. The question was about
country selection.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Jose
Guest
Posts: n/a
 
      12-27-2005
> Then you might be looking for United States somewhere between the Ukraine and
> Uruguay, in vain.


It would be there, in addition.

> Google is known for its obscure, undocumented, and harmful trickery in
> choosing the interface language according to various data.


It is not known to me for this. Enlighten me.

Jose
--
You can choose whom to befriend, but you cannot choose whom to love.
for Email, make the obvious change in the address.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-27-2005
Jose <(E-Mail Removed)> wrote:

>> Then you might be looking for United States somewhere between the
>> Ukraine and Uruguay, in vain.

>
> It would be there, in addition.


Would it? That was not mentioned. Anyway, such a setting would create a
different problem: the user might ask why a country appears several times and
what the difference is. Besides, it would make the large list even larger.

>> Google is known for its obscure, undocumented, and harmful trickery in
>> choosing the interface language according to various data.

>
> It is not known to me for this. Enlighten me.


Oh, it has been discussed at length on different fora. I don't know of any
summary page, and it would be difficult to compose one, since Google keeps
changing.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Jose
Guest
Posts: n/a
 
      12-27-2005
> Would it? That was not mentioned.

It would be sensible.

> Besides, it would make the large list even larger.


By a few entries. More than three duplicated at the top would be too
many to be useful anyway, and for a small list, there'd be no need.

> Oh, [google's harmful trickery] has been discussed at length on different fora.


Ok. I'm convinced.

Jose
--
You can choose whom to befriend, but you cannot choose whom to love.
for Email, make the obvious change in the address.
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      12-28-2005
Gazing into my crystal ball I observed "Jukka K. Korpela"
<(E-Mail Removed)> writing in
news:Xns9739E35EF4CF7jkorpelacstutfi@193.229.4.246 :

> Adrienne Boswell <(E-Mail Removed)> wrote:
>
>> In addition to what others have said, if you are going to make a drop
>> down list of countries, and your users are usually in a specific
>> country (ie American Loyalty Card), then have that country as the
>> first choice.

>
> While that may sound natural, and may actually help at times, it will
> also mislead people. If you take a quick look at a dropped-down menu,
> you probably see that it's in alphabetic order, which is a natural
> expectation anyway. Then you might be looking for United States
> somewhere between the Ukraine and Uruguay, in vain.


It is duplicated. In the case of the US, it is duplicated once. I would
not do that for a country that had a lot of choices, as was discussed
futher up in this thread.

>
>> You can also do some best guessing looking at the
>> HTTP_ACCEPT_LANGUAGE.

>
> That would be foolish, really.
>
>> That's what Google does in determining which interface to serve.

>
> Google is known for its obscure, undocumented, and harmful trickery in
> choosing the interface language according to various data.
>
>> For instance, if your accept language is French, Google will serve
>> pages in French. Mind you, it's definately not fool proof.

>
> If only it did so (consistently), things would be better. The
> Accept-Language header (that's it's name; the CGI interface
> transmogrifies it into HTTP_ACCEPT_LANGUAGE) is meant exactly for that:
> for expressing the user's linguistic preferences, for use when the
> server has the same content available in two or more languages.
> Confusing it with country selection is the start of infinite confusion
> and frustration. The question was about country selection.
>


You are absolutely correct. In fact, for a site I am working on, when it
goes international, I will be removing US as the first choice on the list.
But that won't be for some time, however, I'm making a note in my calendar
that I need to do this.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
Andrew Donaldson
Guest
Posts: n/a
 
      12-30-2005
Rob McAninch wrote:

>>>Is it possible to make a select lst of all countries in the world?

>>
>>google could help here:
>>http://www.thefixor.com/help/countryDRP.html

>
> I question the usefulness of such drop down lists. Most people know
> what country they live in and can type it much faster than scrolling
> a list (or typing to get the list closer to the choice you need).


Further to this and the other problems outlined in this thread:

Today I received (in the UK) a parcel which was posted in the UK. The
parcel has arrived via the United States, complete with customs declaration.

Why? Because the last line of my address on the parcel reads "United
States" (even though the rest of the address was correct.) The item in
the parcel was ordered via a website. I had to choose the country from a
select list.

Now I think the mistake is almost entirely mine. I may have clicked on
the wrong item in the list. More likely, I scrolled the select box with
my mouse wheel when attempting to scroll the web page. I do that a lot.
I could also have checked the details more carefully before final
submission.

But I do know for absolute sure that I would not have made that mistake
if I had to type in the country myself!

Andrew
 
Reply With Quote
 
Daniel Schierbeck
Guest
Posts: n/a
 
      12-30-2005
Leszek wrote:
> Hi.
> Is it possible to make a select lst of all countries in the world?
> Is there a list of countries i could download and place it in my form?
>
> thanx
> Leszek
>
>


Here's an XML file containing a list of all the countries in the world,
plus the two-letter abbreviation.

<country abbr="DK">Denmark</country>


Cheers and happy holidays
Daniel Schierbeck

 
Reply With Quote
 
Daniel Schierbeck
Guest
Posts: n/a
 
      12-30-2005
Daniel Schierbeck wrote:
> Leszek wrote:
>> Hi.
>> Is it possible to make a select lst of all countries in the world?
>> Is there a list of countries i could download and place it in my form?
>>
>> thanx
>> Leszek
>>

>
> Here's an XML file containing a list of all the countries in the world,
> plus the two-letter abbreviation.
>
> <country abbr="DK">Denmark</country>
>
>
> Cheers and happy holidays
> Daniel Schierbeck
>
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" standalone="no"?>
> <?xml-stylesheet type="text/css" href="countrylist.css"?>
> <country-list xmlns="" xml:lang="en">
> <country abbr="AF">Afghanistan</country>
> <country abbr="AL">Albania</country>
> <country abbr="DZ">Algeria</country>
> <country abbr="AS">American Samoa</country>
> <country abbr="AD">Andorra</country>
> <country abbr="AO">Angola</country>
> <country abbr="AI">Anguilla</country>
> <country abbr="AQ">Antarctica</country>
> <country abbr="AG">Antigua and Barbuda</country>
> <country abbr="AR">Argentina</country>
> <country abbr="AM">Armenia</country>
> <country abbr="AW">Aruba</country>
> <country abbr="AU">Australia</country>
> <country abbr="AT">Austria</country>
> <country abbr="AZ">Azerbaijan</country>
> <country abbr="BS">Bahamas</country>
> <country abbr="BH">Bahrain</country>
> <country abbr="BD">Bangladesh</country>
> <country abbr="BB">Barbados</country>
> <country abbr="BY">Belarus</country>
> <country abbr="BE">Belgium</country>
> <country abbr="BZ">Belize</country>
> <country abbr="BJ">Benin</country>
> <country abbr="BM">Bermuda</country>
> <country abbr="BT">Bhutan</country>
> <country abbr="BO">Bolivia</country>
> <country abbr="BA">Bosnia and Herzegowina</country>
> <country abbr="BW">Botswana</country>
> <country abbr="BV">Bouvet Island</country>
> <country abbr="BR">Brazil</country>
> <country abbr="IO">British Indian Ocean Territory</country>
> <country abbr="BN">Brunei Darussalam</country>
> <country abbr="BG">Bulgaria</country>
> <country abbr="BF">Burkina Faso</country>
> <country abbr="BI">Burundi</country>
> <country abbr="KH">Cambodia</country>
> <country abbr="CM">Cameroon</country>
> <country abbr="CA">Canada</country>
> <country abbr="CV">Cape Verde</country>
> <country abbr="KY">Cayman Islands</country>
> <country abbr="CF">Central African Republic</country>
> <country abbr="TD">Chad</country>
> <country abbr="CL">Chile</country>
> <country abbr="CN">China</country>
> <country abbr="CX">Christmas Island</country>
> <country abbr="CC">Cocos (Keeling) Islands</country>
> <country abbr="CO">Colombia</country>
> <country abbr="KM">Comoros</country>
> <country abbr="CG">Congo</country>
> <country abbr="CD">Congo, the Democratic Republic of the</country>
> <country abbr="CK">Cook Islands</country>
> <country abbr="CR">Costa Rica</country>
> <country abbr="CI">Cote d’Ivoire</country>
> <country abbr="HR">Croatia (Hrvatska)</country>
> <country abbr="CU">Cuba</country>
> <country abbr="CY">Cyprus</country>
> <country abbr="CZ">Czech Republic</country>
> <country abbr="DK">Denmark</country>
> <country abbr="DJ">Djibouti</country>
> <country abbr="DM">Dominica</country>
> <country abbr="DO">Dominican Republic</country>
> <country abbr="TP">East Timor</country>
> <country abbr="EC">Ecuador</country>
> <country abbr="EG">Egypt</country>
> <country abbr="SV">El Salvador</country>
> <country abbr="GQ">Equatorial Guinea</country>
> <country abbr="ER">Eritrea</country>
> <country abbr="EE">Estonia</country>
> <country abbr="ET">Ethiopia</country>
> <country abbr="FK">Falkland Islands (Malvinas)</country>
> <country abbr="FO">Faroe Islands</country>
> <country abbr="FJ">Fiji</country>
> <country abbr="FI">Finland</country>
> <country abbr="FR">France</country>
> <country abbr="FX">France, Metropolitan</country>
> <country abbr="GF">French Guiana</country>
> <country abbr="PF">French Polynesia</country>
> <country abbr="TF">French Southern Territories</country>
> <country abbr="GA">Gabon</country>
> <country abbr="GM">Gambia</country>
> <country abbr="GE">Georgia</country>
> <country abbr="DE">Germany</country>
> <country abbr="GH">Ghana</country>
> <country abbr="GI">Gibraltar</country>
> <country abbr="GR">Greece</country>
> <country abbr="GL">Greenland</country>
> <country abbr="GD">Grenada</country>
> <country abbr="GP">Guadeloupe</country>
> <country abbr="GU">Guam</country>
> <country abbr="GT">Guatemala</country>
> <country abbr="GN">Guinea</country>
> <country abbr="GW">Guinea-Bissau</country>
> <country abbr="GY">Guyana</country>
> <country abbr="HT">Haiti</country>
> <country abbr="HM">Heard and Mc Donald Islands</country>
> <country abbr="VA">Holy See (Vatican City State)</country>
> <country abbr="HN">Honduras</country>
> <country abbr="HK">Hong Kong</country>
> <country abbr="HU">Hungary</country>
> <country abbr="IS">Iceland</country>
> <country abbr="IN">India</country>
> <country abbr="ID">Indonesia</country>
> <country abbr="IR">Iran (Islamic Republic of)</country>
> <country abbr="IQ">Iraq</country>
> <country abbr="IE">Ireland</country>
> <country abbr="IL">Israel</country>
> <country abbr="IT">Italy</country>
> <country abbr="JM">Jamaica</country>
> <country abbr="JP">Japan</country>
> <country abbr="JO">Jordan</country>
> <country abbr="KZ">Kazakhstan</country>
> <country abbr="KE">Kenya</country>
> <country abbr="KI">Kiribati</country>
> <country abbr="KP">Korea, Democratic People’s Republic of</country>
> <country abbr="KR">Korea, Republic of</country>
> <country abbr="KW">Kuwait</country>
> <country abbr="KG">Kyrgyzstan</country>
> <country abbr="LA">Lao People’s Democratic Republic</country>
> <country abbr="LV">Latvia</country>
> <country abbr="LB">Lebanon</country>
> <country abbr="LS">Lesotho</country>
> <country abbr="LR">Liberia</country>
> <country abbr="LY">Libyan Arab Jamahiriya</country>
> <country abbr="LI">Liechtenstein</country>
> <country abbr="LT">Lithuania</country>
> <country abbr="LU">Luxembourg</country>
> <country abbr="MO">Macau</country>
> <country abbr="MK">Macedonia, The Former Yugoslav Republic of</country>
> <country abbr="MG">Madagascar</country>
> <country abbr="MW">Malawi</country>
> <country abbr="MY">Malaysia</country>
> <country abbr="MV">Maldives</country>
> <country abbr="ML">Mali</country>
> <country abbr="MT">Malta</country>
> <country abbr="MH">Marshall Islands</country>
> <country abbr="MQ">Martinique</country>
> <country abbr="MR">Mauritania</country>
> <country abbr="MU">Mauritius</country>
> <country abbr="YT">Mayotte</country>
> <country abbr="MX">Mexico</country>
> <country abbr="FM">Micronesia, Federated States of</country>
> <country abbr="MD">Moldova, Republic of</country>
> <country abbr="MC">Monaco</country>
> <country abbr="MN">Mongolia</country>
> <country abbr="MS">Montserrat</country>
> <country abbr="MA">Morocco</country>
> <country abbr="MZ">Mozambique</country>
> <country abbr="MM">Myanmar</country>
> <country abbr="NA">Namibia</country>
> <country abbr="NR">Nauru</country>
> <country abbr="NP">Nepal</country>
> <country abbr="NL">Netherlands</country>
> <country abbr="AN">Netherlands Antilles</country>
> <country abbr="NC">New Caledonia</country>
> <country abbr="NZ">New Zealand</country>
> <country abbr="NI">Nicaragua</country>
> <country abbr="NE">Niger</country>
> <country abbr="NG">Nigeria</country>
> <country abbr="NU">Niue</country>
> <country abbr="NF">Norfolk Island</country>
> <country abbr="MP">Northern Mariana Islands</country>
> <country abbr="NO">Norway</country>
> <country abbr="OM">Oman</country>
> <country abbr="PK">Pakistan</country>
> <country abbr="PW">Palau</country>
> <country abbr="PA">Panama</country>
> <country abbr="PG">Papua New Guinea</country>
> <country abbr="PY">Paraguay</country>
> <country abbr="PE">Peru</country>
> <country abbr="PH">Philippines</country>
> <country abbr="PN">Pitcairn</country>
> <country abbr="PL">Poland</country>
> <country abbr="PT">Portugal</country>
> <country abbr="PR">Puerto Rico</country>
> <country abbr="QA">Qatar</country>
> <country abbr="RE">Reunion</country>
> <country abbr="RO">Romania</country>
> <country abbr="RU">Russian Federation</country>
> <country abbr="RW">Rwanda</country>
> <country abbr="KN">Saint Kitts and Nevis</country>
> <country abbr="LC">Saint LUCIA</country>
> <country abbr="VC">Saint Vincent and the Grenadines</country>
> <country abbr="WS">Samoa</country>
> <country abbr="SM">San Marino</country>
> <country abbr="ST">Sao Tome and Principe</country>
> <country abbr="SA">Saudi Arabia</country>
> <country abbr="SN">Senegal</country>
> <country abbr="SC">Seychelles</country>
> <country abbr="SL">Sierra Leone</country>
> <country abbr="SG">Singapore</country>
> <country abbr="SK">Slovakia (Slovak Republic)</country>
> <country abbr="SI">Slovenia</country>
> <country abbr="SB">Solomon Islands</country>
> <country abbr="SO">Somalia</country>
> <country abbr="ZA">South Africa</country>
> <country abbr="GS">South Georgia and the South Sandwich Islands</country>
> <country abbr="ES">Spain</country>
> <country abbr="LK">Sri Lanka</country>
> <country abbr="SH">St. Helena</country>
> <country abbr="PM">St. Pierre and Miquelon</country>
> <country abbr="SD">Sudan</country>
> <country abbr="SR">Suriname</country>
> <country abbr="SJ">Svalbard and Jan Mayen Islands</country>
> <country abbr="SZ">Swaziland</country>
> <country abbr="SE">Sweden</country>
> <country abbr="CH">Switzerland</country>
> <country abbr="SY">Syrian Arab Republic</country>
> <country abbr="TW">Taiwan, Province of China</country>
> <country abbr="TJ">Tajikistan</country>
> <country abbr="TZ">Tanzania, United Republic of</country>
> <country abbr="TH">Thailand</country>
> <country abbr="TG">Togo</country>
> <country abbr="TK">Tokelau</country>
> <country abbr="TO">Tonga</country>
> <country abbr="TT">Trinidad and Tobago</country>
> <country abbr="TN">Tunisia</country>
> <country abbr="TR">Turkey</country>
> <country abbr="TM">Turkmenistan</country>
> <country abbr="TC">Turks and Caicos Islands</country>
> <country abbr="TV">Tuvalu</country>
> <country abbr="UG">Uganda</country>
> <country abbr="UA">Ukraine</country>
> <country abbr="AE">United Arab Emirates</country>
> <country abbr="GB">United Kingdom</country>
> <country abbr="US">United States</country>
> <country abbr="UM">United States Minor Outlying Islands</country>
> <country abbr="UY">Uruguay</country>
> <country abbr="UZ">Uzbekistan</country>
> <country abbr="VU">Vanuatu</country>
> <country abbr="VE">Venezuela</country>
> <country abbr="VN">Viet Nam</country>
> <country abbr="VG">Virgin Islands (British)</country>
> <country abbr="VI">Virgin Islands (U.S.)</country>
> <country abbr="WF">Wallis and Futuna Islands</country>
> <country abbr="EH">Western Sahara</country>
> <country abbr="YE">Yemen</country>
> <country abbr="YU">Yugoslavia</country>
> <country abbr="ZM">Zambia</country>
> <country abbr="ZW">Zimbabwe</country>
> </country-list>


Two things.

1. Just remove the stylesheet PI, I forgot to do it before I sent the
XML file to you.

2. You can use XSLT to transform the document into XHTML.


Cheers,
Daniel
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
France - Belgium July 2008 Travel Pictures Country next to Country BoBi Digital Photography 0 07-19-2008 10:27 AM
Kenya-France July 2008 Travel Pictures Country next to Country BoBi Digital Photography 0 07-13-2008 06:55 AM
Kenya-Belgium June 2008 Travel Pictures Country next to Country BoBi Digital Photography 0 06-01-2008 03:12 PM
Country list with iso1366 codes and local country names Zyron HTML 2 11-08-2005 04:55 PM
Onchange of dropdownlist say "country" loaded,it must load all "states" for that country in another drop downlist. S.Guhananth ASP .Net 1 04-30-2005 12:01 PM



Advertisments