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 10:44:18 +1000
Message-ID: <40E20CE2.2020505@voracity.org>
Matthew Raymond wrote:
> Sample Code:
> 
> <html>
> <head><title>Combo Example</title></head>
> <body>
>   <form>
>     <input type="text" id="combotext" name="combotext" />
>     <combo for="combotext">
>       <comboitem value="Item 1" />
>       <comboitem value="Item 2" />
>       <comboitem value="Item 3" />
>     </combo>
>     <script language="ECMAScript" src="nonWF2_dropdown.js"></script>
>   </form>
> </body>

If the autocomplete case is the only one that will be implemented, then I like 
this solution best (but not with the tag name 'combo'). The only change I'd 
suggest is to remove the 'for' attribute from combo, and put a 'suggest' 
attribute in the input. That way multiple input's can make use of the same list 
of suggestions.

That is:

      <input type="text" name="combotext" suggest="somedata"/>
      <input type="text" name="anothercombotext" suggest="somedata"/>
      <combo id="somedata">
        <comboitem value="Item 1" />
        <comboitem value="Item 2" />
        <comboitem value="Item 3" />
      </combo>
      <script language="ECMAScript" src="nonWF2_dropdown.js"></script>
Received on Tuesday, 29 June 2004 17:44:18 UTC

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