Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25860
| From | "Mel Smith" <syntel@cox.net> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Stopping Multi-submits ? |
| Date | 2014-09-23 08:58 -0600 |
| Message-ID | <c8dg58F7c6lU1@mid.individual.net> (permalink) |
Hi:
Situation:
To forestall a user multi-clicking on a submit button, I use JS code
similar to the following:
getobj("mybuttonid").disabled=true ;
getobj("myloginid").submit() ;
(where the getobj() function is simply my short way of using
document.getElementById() )
Result:
If my server response is very slow, my user hitting the submit button
repeatedly will *not* result in successive submits because the submit button
is now disabled.
Problem:
In IE11 (at least), after the new page arrives, if the user decides to
use the 'back arrow' to re-load the previous page, then that submit button
is *still* disabled, when I wish it to be enabled and ready for another
submit
Question:
How do I restrain multiple submits, *but* allow submits again after a
new page has arrived, and then the user 'arrows' back to the previous page
(or pages).
(btw, I tried putting the re-enabling code in the onload event, but I
guess that the onload code doesn't get activated if the user simply uses his
back-arrow to get his previous page ?? )
Thanks.
-Mel Smith
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Stopping Multi-submits ? "Mel Smith" <syntel@cox.net> - 2014-09-23 08:58 -0600
Re: Stopping Multi-submits ? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-09-23 20:22 +0200
Re: Stopping Multi-submits ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-09-24 02:50 +0200
Re: Stopping Multi-submits ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-09-23 20:31 +0200
Re: Stopping Multi-submits ? "Mel Smith" <syntel@cox.net> - 2014-09-23 16:27 -0600
Re: Stopping Multi-submits ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-09-24 00:54 +0200
Re: Stopping Multi-submits ? "Mel Smith" <syntel@cox.net> - 2014-09-24 08:24 -0600
csiph-web