Jump to content

Prevent Double Entry


Recommended Posts

My page allows the user to type in a number and click Enter or press the Enter Key (submit button). My next page then process that number.

But if the user clicks twice (or presses the Enter Key twice), my next page gets the number twice.

How can I prevent the user from doing this double entry?  e.g. Can I disable the submit button after it's been used?



Link to comment
Share on other sites

Sorry.  I guess I wasn't clear.

I am using "onsubmit" in Form. My input tag is a "type=submit".  When the user clicks on this 'submit' button more than once (or presses the "Return" key more than once) I end up with multiple entries.  My "onsubmit" goes to a function that checks to see if the input number is valid and if OK the submission is allowed (return true).

So, how do I prevent multiple submissions from taking place.  There should not be another entry until there is a visible server  response to the first submission.


Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...