J
Jeff
I have a payment form with a submit button. A large percentage of users
double-click the submit button thus submitting their payment information
twice. I would like to use javascript to disable the submit button once
it's been clicked, yet still have the form submit. I can do this in ASP
2.0, however, ASP.Net seems to be adversely affected if you disable the
submit button. Here's how I have it set up...
The submit button is a WebControls.Button
In the Page_Load event I attach an "onclick" javascript event handler to
disable the submit button.
i.e. btnSubmit.Attributes.Add("onclick", "document.Form1.btnSubmit.disabled
= true; return true;")
The problem with this is once the button is disable the form will not
submit. If I change it to the following it will work, however, the button
will not be disabled.
i.e. btnSubmit.Attributes.Add("onclick", "document.Form1.btnSubmit.disabled
= false; return true;")
Any ideas on how to accomplish this?
Thanks!
double-click the submit button thus submitting their payment information
twice. I would like to use javascript to disable the submit button once
it's been clicked, yet still have the form submit. I can do this in ASP
2.0, however, ASP.Net seems to be adversely affected if you disable the
submit button. Here's how I have it set up...
The submit button is a WebControls.Button
In the Page_Load event I attach an "onclick" javascript event handler to
disable the submit button.
i.e. btnSubmit.Attributes.Add("onclick", "document.Form1.btnSubmit.disabled
= true; return true;")
The problem with this is once the button is disable the form will not
submit. If I change it to the following it will work, however, the button
will not be disabled.
i.e. btnSubmit.Attributes.Add("onclick", "document.Form1.btnSubmit.disabled
= false; return true;")
Any ideas on how to accomplish this?
Thanks!