Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | JavaScript | Form 7.3 | Q1789 [ previous next ]

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?

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">

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.