[whatwg] default action/button for forms
michael at quuxo.com
Thu Feb 10 19:34:26 PST 2005
After looking through the archives, surprised to find that there has
been no mention of some way to specify the default button/action for a
Most browsers behave as the Web Forms 2.0 spec specifies in section 2.3,
"Changes to existing controls". That is, the first button is used as the
default. But this is pretty annoying behaviour. In a large form, it is
common to have several submit buttons and is is just as likely as it is
not that the first button should be the default.
As a result, web application developers generally resort to one of two
trap key events or the form submission event.
For me is is also a problem because <troll>like today's common usable
desktop environments (Mac OS, GNOME, etc),</troll> I design forms so
that the default button is to the right of any additional action
It would be great to see some way of specifying the default button for
the form in Web Forms 2.0, or some later revision. One way of
implementing this (and the way I would do it if I was fixing the problem
similar to the form element. This would be an IDREF that specifies the
id of the default submit button. Eg:
<form action="bofh" method="post" default-action="lart">
<input type="text" name="who">
<input type="submit" id="ignore" name="action" value="Ignore">
<input type="submit" id="lart" name="action" value="LART">
What do you think?
Michael Gratton, Software Architect.
Quuxo Software <http://web.quuxo.com/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the whatwg