W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] Forms dont submit when disabling submit button

From: Kaustubh Atrawalkar <kaustubh@motorola.com>
Date: Tue, 27 Sep 2011 23:35:45 +0530
Message-ID: <CANw-Mg_iGxnBYXOjJTjcufee2yeXhVwvQLLT2E5FEBNjqiENHw@mail.gmail.com>
A simple use case -

<form action="javascript:alert('SUCCESS')">
<input type="submit" onclick="this.disabled=true; return true;">
This does not submit the form in IE, Opera or Webkit but in firefox it does
show alert. Considering generic behavior of HTML5 forms, until and unless
submit button is active submit action should also be followed by onclick
event on submit button. Just need to get what can be the exact behavior
According to specs, (
when button is activated, it should submit the form.

Kaustubh Atrawalkar
Received on Tuesday, 27 September 2011 11:05:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC