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 post
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 post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...