Geeks With Blogs

Scott Kuhl Warning: I may have no idea what I am talking about!

A recent Quick Tip at ASP101.com caught my eye the other day. The tip, titled Stop Users from Double Clicking, showed how to add a small bit of JavaScript to a form's submit button to prevent users from submitting a form more than once. The tip is remarkably simple - in the button's client-side onclick event, simply set the button's disabled property to true.

In my projects, I've always used a somewhat different method that is a little more involved. Rather than just disabling the submit button, I "freeze" the screen and show a message explaining that their data is being processed. Personally, I prefer the look and feel of the frozen screen, as it's more obvious that the data has been sent back to the server and is being processed. Also, it prevents the user from clicking other submit buttons that may be on the page. Read on to learn more about both of these techniques!

Read Prevent Users from Submitting a Form Twice by Scott Mitchell

Posted on Friday, October 6, 2006 5:21 AM ASP.NET | Back to top


Comments on this post: Prevent Users from Submitting a Form Twice

# re: Prevent Users from Submitting a Form Twice
Requesting Gravatar...
hihello iam laxmi narayana
Left by laxmi on Dec 09, 2007 6:58 PM

# re: Prevent Users from Submitting a Form Twice
Requesting Gravatar...
dsfg dsg fsdg sdfg
Left by sdf on Apr 06, 2009 9:12 PM

Your comment:
 (will show your gravatar)


Copyright © Scott Kuhl | Powered by: GeeksWithBlogs.net