It works! Thank you!
It still allows the button to be pressed a couple of times before
getting disabled if it's pressed quickly though. Any idea why? My
function is:
.var btnPress = false;
.function verify (object) {
. if (btnPress == false) {
. btnPress = true; }
. else {
. object.disabled=true;
. object.form.submit(); }
. return true;
.}
Bj wrote:
Hi Diane
----- Original Message ----- From: "Diane Schips"
I have a page that can take a few seconds to go to the next page once
the submit button is pressed. The page submits an email back to the
site owner, so when visitors press the submit button multiple times,
it causes problems.
Why not have a flag 'buttonpressed' that starts off false. Then in
the script called by clicking the button, if buttonpressed is false
you set it to true, send your email etc but if it's true then the
script does nothing, or even tells the user to lay off clicking the
button. So the script can only run once, first time the button is
pressed.
<script>
var buttonpressed = FALSE;
function buttonclick() {
if (!buttonpressed) {
buttonpressed = TRUE;
email stuff;
etc;
}
else alert('Please be patient, I'm going as quick as I can!');
}
</script>
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To:
mailto:[EMAIL PROTECTED] or
use the web interface
http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web
interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.