What's the best method to prevent a user from double clicking a submit button?
Posted on 2012-08-16
I was wondering how it is possible to prevent someone from double clicking a submit button on slow running pages?
My server sometimes runs slow, and when I click the submit button , I just see the page sitting there doing nothing. The only indication anything is happening is the page activity icon telling me that it is waiting for the server to respond. I would get impatient and click the submit button again which at times would cause and error, or worst, keep sending requests to the server until it times out.
I think it's possible to automatically grey out the submit button after it is clicked so that a user cannot keep jamming on the submit button? Is this the best method? If so, how does one accomplish it? If this is not the recommended method, how than do I solve this issue?
Thanks for any feedback and guidance!