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

Matthew Raymond mattraymond at earthlink.net
Wed Jun 30 09:09:44 PDT 2004


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>.





More information about the whatwg mailing list