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

RE: Single label for 2 inputs?

From: David Bindel <dbindel@austin.rr.com>
Date: Mon, 29 Apr 2002 06:37:25 -0500
To: <www-html@w3.org>
Message-ID: <000001c1ef72$3c3bd970$0301a8c0@david>
>> I wish to use the same label for 2 separate inputs but what to know
>> how or if it is even allowed.

Nope.  Not allowed.

>> Example:
>> I have a form with 5 options the last being 'other:' with an option
>> to enter the 'other' in a type="text". Now can I use  the one label
>> tag or should I use two or shouldn't I do this at all.

What's the point of this???  You can't click on a label and have TWO
form controls selected.  Think about it: you click the label and it
selects BOTH form fields.  Then you start typing something.  What is the
browser supposed to do: automatically focus on the text box, or go to a
selection in the list box that matches what you type?  This is why you
cannot use the same label for 2 inputs.

What you can do is have a script that when "other" is selected from the
menu it will focus on the "Other" text input box.

Sincerely,
David Bindel
Received on Monday, 29 April 2002 07:37:25 GMT

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