[whatwg] Menus, fallback, and backwards compatibility: ideas wanted

Ian Hickson ian at hixie.ch
Wed Dec 14 14:11:55 PST 2005


On Wed, 14 Dec 2005, Ian Hickson wrote:
> 
>    <menu type="commands">
>     <select>
>      <option/>
>      <option/>
>      <option/>
>     </select>
>     <input type="submit">
>    </menu>

How about:

   <form action="redirect.cgi">
    <menu type="commands">
     <menu label="Select site...">
      <select name="goto"
              onchange="if (this.options[this.selectedIndex].value)
                          location = this.options[this.selectedIndex].value">
       <option value="" selected="selected"> Select site: </option>
       <option value="http://www.apple.com/"> Apple </option>
       <option value="http://www.mozilla.org/"> Mozilla </option>
       <option value="http://www.opera.com/"> Opera </option>
      </select>
      <span><input type="submit" value="Go"></span>
     </menu>
    </menu>
   </form>

The outer menu makes the toolbar, the inner menu is a drop-down button on 
that toolbar. (Well, semantically it's just saying that there's a set of 
commands, consisting of a nested set of commands, which allows things like 
the Ribbon effect for expanding and/or contracting the UI on the fly.)

The <span></span> hides the <input> from the <menu>. The value="" hides 
that <option> from the menu.

Is this too ugly?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list