Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1789 Is there a way I can de-activate a submit button after it's been hit by the user, so that in the same session, the user can't use the button again?

You are here: irt.org | FAQ | JavaScript | Form | 7.3 | Q1789 [ previous next ]

Try:

<form onSubmit="if (this.submitted) return false;this.submitted=true">

If you have form validation as well:

<form onSubmit="if (this.submitted) return false;if (validate(this)) this.submitted=true">

©2018 Martin Webb