Re: [whatwg] input type=country?

2006-08-25 Thread Anne van Kesteren
On Thu, 24 Aug 2006 19:00:15 +0200, Charles McCathieNevile  
[EMAIL PROTECTED] wrote:
I agree with all the arguments against speccing this, but also this  
smells much more like a browser feature to me. I think a much more  
realistic
approach would be for browser vendors to offer a setting to try to by  
default select the user's country when they encounter such a list in a  
page's form.


Opera supports RFC 2706 http://ietf.org/rfc/rfc2706 for form controls  
which basically allows page authors to indicate what certain form controls  
are for allowing them to be pre-filled.



--
Anne van Kesteren
http://annevankesteren.nl/
http://www.opera.com/



Re: [whatwg] input type=country?

2006-08-24 Thread Ian Hickson

The idea of a control for countries was considered. However, it was 
rejected because I couldn't get agreement from UAs to implement it. They 
cited many of the reasons given in this thread, and some more, such as 
being worried about being sued (like Microsoft was when Windows 95 shipped 
with a country control in the datetime control panel).

So. For the people who want this: if you want this in the spec, you first 
need to convince the browser vendors to agree to implement something like 
this. Until there are vendors who want to implement it, adding it to the 
spec is a waste of time.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] input type=country?

2006-08-24 Thread James Graham

Sander Tekelenburg wrote:


A good implementation would
- know how to handle different spellings/synonyms (like US/USA, UK/England,
Holland/The Netherlands/Nederland, etc.)
- make proper use of the OS' language/location settings, if available, for
its initial setting, but allow the user to override that (because, for
example, many run their OS in american english even though their location or
nationality may be something else.)


A much simpler implementation would simply work like existing form autofill, 
matching values the values that the user has supplied to other country inputs in 
the past without needing any explicit setup.


--
Eternity's a terrible thought. I mean, where's it all going to end?
 -- Tom Stoppard, Rosencrantz and Guildenstern are Dead


Re: [whatwg] input type=country?

2006-08-24 Thread Charles McCathieNevile
On Thu, 24 Aug 2006 18:44:26 +0200, Sander Tekelenburg  
[EMAIL PROTECTED] wrote:



I agree with all the arguments against speccing this, but also this  
smells

much more like a browser feature to me. I think a much more realistic
approach would be for browser vendors to offer a setting to try to by  
default
select the user's country when they encounter such a list in a page's  
form.


Agreed.


A good implementation would
- know how to handle different spellings/synonyms (like US/USA,  
UK/England,

Holland/The Netherlands/Nederland, etc.)
- make proper use of the OS' language/location settings, if available,  
for

its initial setting, but allow the user to override that (because, for
example, many run their OS in american english even though their  
location or

nationality may be something else.)

Some people will probably argue that users won't bother to define their
settings for this, but IMO that only means that the user apparently  
doesn't care then.


Right. Or is like me and selects too many countries for too many different  
things to have a sensible default.


I imagine the quickest way to get an implementation would be in the form  
of a Firefox plug-in.


Actually, it should be possible as a user javascript, for anyone who can  
write javascript right.


find select where option=$Locale
remove selected from option selected in that select.
Set option=$locale selected.

or something like that.

Hi Sander, BTW.

cheers

Chaals


--
  Charles McCathieNevile, Opera Software: Standards Group
  hablo español  -  je parle français  -  jeg lærer norsk
[EMAIL PROTECTED]  Try Opera 9 now! http://opera.com


Re: [whatwg] input type=country?

2006-08-24 Thread Sander Tekelenburg
At 17:54 +0100 UTC, on 2006-08-24, James Graham wrote:

 Sander Tekelenburg wrote:

 A good implementation would

[...]

 A much simpler implementation would simply work like existing form autofill,
 matching values the values that the user has supplied to other country
inputs in
 the past without needing any explicit setup.

Agreed. That would probably work even better/simpler.


-- 
Sander Tekelenburg, http://www.euronet.nl/~tekelenb/


[whatwg] input type=country?

2006-08-23 Thread Martijn

There are times I have to select in which country I live in.
Wouldn't a input type=country widget be useful here?
I couldn't find one on the web forms 2.0 spec, but something in that
line is already there, then I'm sorry, and you can ignore this mail.

Regards,
Martijn


Re: [whatwg] input type=country?

2006-08-23 Thread Alexey Feldgendler
On Wed, 23 Aug 2006 20:44:37 +0700, Martijn [EMAIL PROTECTED]  
wrote:



There are times I have to select in which country I live in.
Wouldn't a input type=country widget be useful here?
I couldn't find one on the web forms 2.0 spec, but something in that
line is already there, then I'm sorry, and you can ignore this mail.


What would be different between input type=country and select?


--
Alexey Feldgendler [EMAIL PROTECTED]
[ICQ: 115226275] http://feldgendler.livejournal.com


Re: [whatwg] input type=country?

2006-08-23 Thread James Graham

Alexey Feldgendler wrote:
On Wed, 23 Aug 2006 20:44:37 +0700, Martijn [EMAIL PROTECTED] 
wrote:



There are times I have to select in which country I live in.
Wouldn't a input type=country widget be useful here?
I couldn't find one on the web forms 2.0 spec, but something in that
line is already there, then I'm sorry, and you can ignore this mail.


What would be different between input type=country and select?


I presume he's thinking of an input with a browser-supplied list of countries. 
This has been discussed before as, as I recall, was considered a huge can of 
worms that we don't want to open.


--
Eternity's a terrible thought. I mean, where's it all going to end?
 -- Tom Stoppard, Rosencrantz and Guildenstern are Dead


Re: [whatwg] input type=country?

2006-08-23 Thread Alexey Feldgendler

On Wed, 23 Aug 2006 20:51:25 +0700, James Graham [EMAIL PROTECTED] wrote:


There are times I have to select in which country I live in.
Wouldn't a input type=country widget be useful here?
I couldn't find one on the web forms 2.0 spec, but something in that
line is already there, then I'm sorry, and you can ignore this mail.



 What would be different between input type=country and select?


I presume he's thinking of an input with a browser-supplied list of  
countries. This has been discussed before as, as I recall, was  
considered a huge can of worms that we don't want to open.


Could you point to that discussion in the archive?


--
Alexey Feldgendler [EMAIL PROTECTED]
[ICQ: 115226275] http://feldgendler.livejournal.com


Re: [whatwg] input type=country?

2006-08-23 Thread James Graham

Alexey Feldgendler wrote:

On Wed, 23 Aug 2006 20:51:25 +0700, James Graham [EMAIL PROTECTED] wrote:


There are times I have to select in which country I live in.
Wouldn't a input type=country widget be useful here?
I couldn't find one on the web forms 2.0 spec, but something in that
line is already there, then I'm sorry, and you can ignore this mail.



 What would be different between input type=country and select?


I presume he's thinking of an input with a browser-supplied list of 
countries. This has been discussed before as, as I recall, was 
considered a huge can of worms that we don't want to open.


Could you point to that discussion in the archive?


See e.g. 
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2004-August/001775.html and 
followups (this isn't the first post in the thread but the thread title seems to 
have changed or something so I didn't find the very start - I think it's good 
enough though)



--
Eternity's a terrible thought. I mean, where's it all going to end?
 -- Tom Stoppard, Rosencrantz and Guildenstern are Dead


Re: [whatwg] input type=country?

2006-08-23 Thread David Håsäther

On 8/23/06, Martijn [EMAIL PROTECTED] wrote:

On 8/23/06, Arve Bersvendsen [EMAIL PROTECTED] wrote:
 On Wed, 23 Aug 2006 15:44:37 +0200, Martijn [EMAIL PROTECTED]
 wrote:

  There are times I have to select in which country I live in.
  Wouldn't a input type=country widget be useful here?
  I couldn't find one on the web forms 2.0 spec, but something in that
  line is already there, then I'm sorry, and you can ignore this mail.

 Which countries we have in the world, and how they are named is a rather
 volatile property. Countries change name depending on the current rule(r),
 and as not-too-distant European history taught us, countries break up.
 The definition of what is a country varies depending on who you ask, so
 such a form control is hard to accomplish.

Well, the browser should be able to keep up with the current list of
countries, shouldn't it? It's not like it is something that is
changing every minute.


But what if you use a browser with an old list, and your contry isn't
listed. Or are you proposing that browsers download a list every time?

--
David Håsäther


Re: [whatwg] input type=country?

2006-08-23 Thread Lachlan Hunt

David Håsäther wrote:

But what if you use a browser with an old list, and your contry isn't
listed. Or are you proposing that browsers download a list every time?


Many modern browsers already periodically check for updates.  Such lists 
could be downloaded like any other update, as required.


--
Lachlan Hunt
http://lachy.id.au/


Re: [whatwg] input type=country?

2006-08-23 Thread David Håsäther

On 8/23/06, Martijn [EMAIL PROTECTED] wrote:

On 8/23/06, David Håsäther [EMAIL PROTECTED] wrote:
  Well, the browser should be able to keep up with the current list of
  countries, shouldn't it? It's not like it is something that is
  changing every minute.

 But what if you use a browser with an old list, and your contry isn't
 listed. Or are you proposing that browsers download a list every time?

That could happen nowadays also, that a country isn't listed in the
select control. Indeed, I would think that the browser would keep up
with a list of available countries.


Yes, this is why it's probably not a good idea to use a select list
for contries, since there is a possibility that your country is not on
the list.

--
David Håsäther


Re: [whatwg] input type=country?

2006-08-23 Thread Alexey Feldgendler
On Wed, 23 Aug 2006 21:24:52 +0700, David Håsäther [EMAIL PROTECTED]  
wrote:



But what if you use a browser with an old list, and your contry isn't
listed. Or are you proposing that browsers download a list every time?



That could happen nowadays also, that a country isn't listed in the
select control. Indeed, I would think that the browser would keep up
with a list of available countries.



Yes, this is why it's probably not a good idea to use a select list
for contries, since there is a possibility that your country is not on
the list.


Web Forms 2.0 provides a datalist element which can be used to supplement  
a free-form text input with a list of suggested values.


Also, we should not forget that Web Forms 2.0 allows datalist and  
select to have a data attribute which references an external list of  
choices. Hosting the list of countries once per website seems like a good  
solution.



--
Alexey Feldgendler [EMAIL PROTECTED]
[ICQ: 115226275] http://feldgendler.livejournal.com


Re: [whatwg] input type=country?

2006-08-23 Thread Martijn

On 8/23/06, Stewart Brodie [EMAIL PROTECTED] wrote:

  But what if you use a browser with an old list, and your contry isn't
  listed. Or are you proposing that browsers download a list every time?

 That could happen nowadays also, that a country isn't listed in the select
 control. Indeed, I would think that the browser would keep up with a list
 of available countries.

Who would look after this list?  The U.N.?  Not all countries in the world
are members of the U.N.  In which languages will this list be maintained?
What am I supposed to do if I'm not on an Internet-connected node?


I would think the list is in the same language as the browser. I don't
see a reason why you should be connected to the internet to be able to
show the input type=country widget (although for submitting forms it
is often necessary).
Yes, I know there are political problems, with a list of countries, so
there is an issue there.

Regards,
Martijn


This sort of 'official list of all possible answers' thing is already a very
real problem for interacting with websites of less enlightened companies and
organisations (primarily in the United States, but I've found a few in other
countries as well, though).  I'm asked to choose a country from the supplied
list, but even though I've selected 'United Kingdom', the form still refuses
to submit because it requires me to say which of the 50 U.S. states I'm in!


--
Stewart Brodie
Software Engineer
ANT Software Limited



Re: [whatwg] input type=country?

2006-08-23 Thread Arve Bersvendsen
On Wed, 23 Aug 2006 16:36:44 +0200, Martijn [EMAIL PROTECTED]  
wrote:



You can have a select list and an input control at the same time, not?


See Lachlan Hunt's suggestion elsewhere in this thread, he uses:

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

This gives you an input type=text that has an attached dropdown with  
your suggestions.  With unobtrusive scripting, you could filter this list  
automatically as the user types (by setting the disabled attribute on  
non-matching options.

--
Arve Bersvendsen, Opera Software ASA, http://www.opera.com/


Re: [whatwg] input type=country?

2006-08-23 Thread Matthew Paul Thomas

On Aug 23, 2006, at 5:08 PM, Dean Edwards wrote:


On 23/08/06, Arve Bersvendsen [EMAIL PROTECTED] wrote:


On Wed, 23 Aug 2006 16:02:24 +0200, Martijn

...

I'm sure there is an official list out there (United Nations?), with
all the countries in the world.


What happens when a web developer lives in a part of the world doesn't
agree with the 'official' list of countries?


You use a select.
...


Or, if you're using Web Forms 2 anyway, a datalist.

--
Matthew Paul Thomas
http://mpt.net.nz/



Re: [whatwg] input type=country?

2006-08-23 Thread Matthew Raymond
Martijn wrote:
 On 8/23/06, David Håsäther [EMAIL PROTECTED] wrote:
 But what if you use a browser with an old list, and your contry isn't
 listed. Or are you proposing that browsers download a list every time?
 
 That could happen nowadays also, that a country isn't listed in the
 select control. Indeed, I would think that the browser would keep up
 with a list of available countries.

   Screw the browser! What happens if the _SERVER_ doesn't have a
specific country name, or expects a name you don't use. You're assuming
that the country is just a string of text that's stored on the server in
the same way someone's name is, but that may not be the case.

   Even if you were to keep your country list on the server in synch
with the list on a browser, which browser do you synchronize with? Are
all the browser vendors supposed to form a central authority to decide
what all the country names are? Do they maintain different lists for
different locales? Even if they did maintain different lists for
different locales, the server would have to be notified as to which
locale you're using.

   Also, how would you refit the old sites to the new system? Are you
going to rewrite all your Perl scripting to use the new widget?

   This whole thing sounds about as fun to spec and implement as
whacking yourself repeatedly between the eyes with a ball pin hammer.