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.