[whatwg] "The first submit button in a form is the form's default button"
kornel at ideadesigners.com
Wed Jul 13 06:09:15 PDT 2005
On Wed, 13 Jul 2005 13:54:48 +0100, Ian Hickson <ian at hixie.ch> wrote:
>> Forms often have multiple submit buttons that perform actions on form
>> data and are not suitable as a default button ("remove this element",
>> and others like add, upload, lookup, etc.). In such cases LAST submit
>> button is more likely to be suitable as the default submit button.
>> Although there are forms, like PayPal login page, where neither first or
>> last submit button is suitable as default (first is creation of new
>> account and last is cancel).
> I agree. However, browsers implement what the spec currently says, so
> there isn't much we can do about what the default default button is.
In IE and FF this can be worked around by inserting invisible button at
the beginning of form to capture default submission.
Opera has diffrent approach (uses button following control in which enter
has been pressed), which makes workaround more difficult, but OTOH current
Opera's solution is good enough.
regards, Kornel Lesinski
More information about the whatwg