Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Stopping Multi-submits ? Date: Tue, 23 Sep 2014 08:58:41 -0600 Lines: 41 Message-ID: X-Trace: individual.net Y8ZK5yA2QSdUHzdLqizsZwWz8rCS6oEzcKefdP8yNAz7lK7Lhk Cancel-Lock: sha1:I7qGzUJVzv1cCN5KmMq/no+92RY= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Xref: csiph.com comp.lang.javascript:25860 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