W3C home > Mailing lists > Public > www-html@w3.org > April 2007

Re: SELECT with arbitrary input and buttons with values separated from text is possible?

From: David Dorward <david@dorward.me.uk>
Date: Wed, 25 Apr 2007 13:58:25 +0100
To: w3c@dv-life.ru
Cc: www-html@w3.org
Message-ID: <20070425125824.GB3639@us-lot.org>

On Wed, Apr 25, 2007 at 08:13:21AM +0400, w3c@dv-life.ru wrote:
> 1. Buttons. Why the value of a button control is equal text on the button?

It isn't.

<button type="submit" name="foo" value="baz">Bar</button>

The display text is Bar. The value sent to the server is baz.

A bug in Microsoft Internet Explorer causes that browser to send Bar
instead. (The usual work around is to use the name attribute to encode
the data instead).

> 2. Why HTML standart not describes combo box with possibility of any user
> input.

I don't know the reasoning here, but one would be useful.

If I were to approach the problem I'd go with the traditional select
with an "Other" option and a text box marked as being for
"Other". Possibly with some JavaScript built on top to make it more
user friendly in supporting browsers.

-- 
David Dorward                                      http://dorward.me.uk
Received on Wednesday, 25 April 2007 12:58:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:09 GMT