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

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

From: voracity <subs@voracity.org>
Date: Wed, 30 Jun 2004 12:59:46 +1000
Message-ID: <40E22CA2.7070604@voracity.org>
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).
Received on Tuesday, 29 June 2004 19:59:46 UTC

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