Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25861

Re: Stopping Multi-submits ?

From Cezary Tomczyk <cezary.tomczyk@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Stopping Multi-submits ?
Date 2014-09-23 20:22 +0200
Organization A noiseless patient Spider
Message-ID <lvsdp5$r0r$1@dont-email.me> (permalink)
References <c8dg58F7c6lU1@mid.individual.net>

Show all headers | View raw


On 2014-09-23 16:58, Mel Smith wrote:
[...]
> 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).
[...]

Maybe do not disable the button, but instead of that when user clicks on 
the button set some state, e.g.:

var submitState = false;

to "true" and when the user clicks on button again just check that state 
and do the right action, e.g. if the state == true then show the message 
for the user that his "request is still in progress".

-- 
Cezary Tomczyk
http://www.ctomczyk.pl/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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