W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2006

[whatwg] input type="country"?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 24 Aug 2006 00:12:39 +1000
Message-ID: <44EC6257.1050207@lachy.id.au>
Anne van Kesteren wrote:
> On Wed, 23 Aug 2006 15:46:51 +0200, Alexey Feldgendler 
> <alexey at feldgendler.ru> wrote:
>> What would be different between <input type="country"> and <select>?
> 
> One allows a list of countries (possibly implemented as a nice globe) 
> and one allows a list of arbitrary things. However, I think we should 
> watch out for feature creep and such although I countries are often 
> asked on sites.

XBL will theoretically allow the author to provide that functionality by 
binding some globe widget to the controls.  Such a widget could possibly 
be implemented using the Google Maps API to render the map and some 
additional script to handle selection of a country.

In a recent site I built, I implemented country selection using 
something like this:

<input type="text" name="country" list="country-list">
<select name="country-list" id="country-list">
     [...]
</select>

Then wrote some JavaScript to simulate the drop down for all browsers, 
except Opera which already has native support.

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Wednesday, 23 August 2006 07:12:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC