W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] Quick thought on the Combo Box problem...

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Wed, 30 Jun 2004 12:09:44 -0400
Message-ID: <40E2E5C8.2020404@earthlink.net>
voracity wrote:
> Good point. That's fine, then. If you want to propose this solution to 
> Ian (or just wait for him to read it or whatever) and just note that 
> |context| will be for WA1.0.

    I'll make that a bit more clear next time, then.

> A point about the DOM: I'd like the currently selected node to be 
> exposed. Thus if a person has chosen (or typed) 'Choice 2', you could 
> use 'combo1.selectedNode' to get the chosen element (i.e. <item 
> value="Choice 2"/>). If the user has typed something new (or hasn't type 
> anything at all), then 'combo1.selectedNode' would be null.

    I don't understand what you want. The selected value will always be 
in the |value| attribute of the input control. If the user changes that 
value, it will still be in the |value| attribute. Why would you need to 
know the selected <item>? (I'm not saying there might not be a scenario 
where you'd need to know the <item>, but I don't see that being 
necessary in a situation where you aren't simply using <select>.)

    That give me an somewhat questionable idea:

<cl id="list1">
   <item value="Choice 1" />
   <item value="Choice 2" />
   <item value="Choice 3" />
</cl>

<label for="combo1">Drop-Down 1: </label>
<input type="text" editable="false" name="dd1" list="list1" />

    It would do the same thing as a <select>.
Received on Wednesday, 30 June 2004 09:09:44 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC