[whatwg] Web Forms 2.0 - repetition model control

Lachlan Hunt lachlan.hunt at lachy.id.au
Sun Oct 16 02:47:11 PDT 2005


Lachlan Hunt wrote:
> ROBO Design wrote:
>> What would probably be better:
>> <input type="template" for="some-template-ID" 
>> action="add|remove|move-up|move-down">
> 
> If you want it done like that, then at least use type="button".  That 
> way, users of legacy UAs don't get confused by a strange text box that 
> they don't know what to put into it, but rather end up with a button 
> that does nothing when clicked.  Neither are ideal from a usability 
> perspective, but the button seems like better graceful degradation.
> 
> However, <button type="add"> already does that, so I'd just leave it as is.

Actually, after a little more thought, the action attribute you 
suggested may actually be better for graceful degradation.  but instead 
of using type="template" or type="button", use type="submit" for either 
<input> or <button>:

<input type="submit" action="add" template="foo" value="Add Row"> OR
<button type="submit" action="add" template="foo">Add Row</button>

That solves the problem with IE, where <button> defaults to push button 
instead of submit.  It could be defined that buttons with a valid and 
known action attribute don't submit the form, but rather behave 
according to the action attribute.

-- 
Lachlan Hunt
http://lachy.id.au/




More information about the whatwg mailing list