1

A form is submitted (files attached), the submit button gets disabled, then the user realizes some mistake and suddenly cancels the page. He is stuck on the page without the ability of submitting his data.

Is there an event to listen, which generated when the user cancels the form submit? This should lead a re-enabled submit button. The keyup event (for the Esc key) is not enough, since the user can click on the browser's cancel button.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Adam
  • 9
  • 2
  • 3
    There is no such event. – adeneo May 05 '13 at 20:48
  • The browser's cancel button? Where is that button? You'll have to provide a definition for "cancel the page". – Šime Vidas May 05 '13 at 20:49
  • @ŠimeVidas It's right there where the reload button is, for most browsers. You probably didn't recognize since it likes to hide if it's not needed. ;) – Kiruse May 05 '13 at 20:51
  • @Derija93 That's the "stop loading" button (usually a red X). – Šime Vidas May 05 '13 at 20:52
  • @ŠimeVidas Don't you think that's exactly what he means? Oh, and chrome has a black X. – Kiruse May 05 '13 at 20:52
  • I think that this link might be what you are looking for : http://stackoverflow.com/questions/895171/prevent-users-from-submitting-form-by-hitting-enter – user123_456 May 05 '13 at 20:52
  • @ŠimeVidas The button with a big X on it, that stops loading the page. I need something like "onloadcancelled" or "onreadyagain"... – Adam May 05 '13 at 20:52
  • @user123_456 Thanks, I'm aware of this. The user can freely submit the form, but while the files are uploading he might spot a mistake, and want to correct it, before the form is completely sent. – Adam May 05 '13 at 20:55
  • Although adeneo says there is no event, perhaps you could look into the onabort event. http://help.dottoro.com/ljxraqdn.php for more info. – lt.kraken May 05 '13 at 21:54

0 Answers0