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

Matthew Raymond wrote:

> <cl id="list1">
>   <item value="Choice 1" />
>   <item value="Choice 2" />
>   <item value="Choice 3" />
> </cl>
> 
> <cl id="cutcopy">
>   <item accesskey="u" value="Cut" />
>   <item accesskey="c" value="Copy" />
>   <item accesskey="p" value="Paste" />
> </cl>
> 
> <p>
> <label for="combo1">Combo 1: </label>
> <input type="text" id="combo1" list="list1" context="cutcopy" />
> <br />
> <label for="text1">Text 1: </label>
> <input type="text" id="text1" context="cutcopy" />
> </p>
> ... if I excluded the |context| attribute from this 
> discussion, what would be my argument for not renaming the |list| 
> attribute to |cl|?

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.

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.

Received on Wednesday, 30 June 2004 07:57:16 UTC