> It still allows the button to be pressed a couple of
> times before getting disabled if it's pressed quickly
> though. Any idea why?
None I'm afraid! Sounds as if the second click was running a second instance
of the script before the first one had set the flag, sounds unlikely, maybe
it's the code.
> My function is:
Your function looks nice and tidy but somehow wrong. If I am reading it
correctly it says "if this is the first time you click the button, set the flag
and do nothing else; on second and subsequent clicks, disable the form and
submit it"
I think you want the 'submit' right after the 'set the flag' as in:
.var btnPress = false;
.function verify (object) {
. if (btnPress == false) {
. btnPress = true;
. object.form.submit(); }
. else
. object.disabled=true;
. return true;
.}
Could be worth a try
-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software
Visit www.ntlworld.com/security for more information
____ 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.