[jQuery] Re: Trying to get a submit button to countdown before being enabled again

2008-03-10 Thread alan
Ok, as an extension of this problem, I also realized that the input forms themselves could still be submitted by hitting 'enter' (in safari), so I am trying to get htem to disable themselves, but for some unbelievably frustrating reason, they stay enabled: function timeOutButton()

[jQuery] Re: Trying to get a submit button to countdown before being enabled again

2008-03-08 Thread alan
Hi Karl, Thanks a ton, that works absolutely perfectly, I think that setting the interval is definitely a better way than using the animate trick for something like this! Not only that, I didn't know about firebug before which is now a huge help! I was struggling with setting manual alerts all ove

[jQuery] Re: Trying to get a submit button to countdown before being enabled again

2008-03-08 Thread Karl Swedberg
Hi Alan, This should do the trick (tested in Firebug): var countdown; var timer = 5; if ( $('#form-submit').val() == 'Submit') { countdown = setInterval(function() { if (timer > 0) { $('#form-submit').val(timer); timer = timer -1; } else {