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

voracity subs at voracity.org
Tue Jun 29 19:59:46 PDT 2004


Matthew Raymond wrote:

>    Hmm... How 'bout this:
> 
>    <popup id="list1">
>      <item value="Item 1" />
>      <item value="Item 2" />
>      <item value="Item 3" />
>    </popup>
> 
>    <label for="combo1">Combo 1: </label>
>    <input type="combo" name="combo1" value="Default" popup="list1" />
> 
>    <label for="combo2">Combo 2: </label>
>    <input type="combo" name="combo2" value="Default" popup="list1" />

Better. Popup is a little generic, though; you can't infer that it's a list of 
data from the name. It could be a popup form, or a list of actions. Perhaps 
<datalist>?

>    <popup id="cutcopy">
>      <item value="Cut" />
>      <item value="Copy" />
>      <item value="Paste" />
>    </popup>
> 
>    <label for="text1">Text 1: </label>
>    <input type="text" name="text1" value="Default" context="cutcopy" />

Well, context menu's are very different functions, but I think this would be a 
good start to achieving that function. You might want to use 'popupitem' instead 
of the more generic 'item' (something like <popupitem value="Cut" 
onselect="doCut()" />).

OTOH, if you want generic lists, you could of course define a <list> tag, and 
then have a 'type' attribute to specialise it for whatever purpose you want 
(since there is no <list> tag atm). For backwards compatibility, you'd be 
restricted to empty item elements, which might not be desirable (unless you use 
conditional comments).



More information about the whatwg mailing list