[whatwg] input type="country"?

Lachlan Hunt lachlan.hunt at lachy.id.au
Wed Aug 23 07:12:39 PDT 2006


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/



More information about the whatwg mailing list