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

BBS: Re: SUBMIT button blocking - August 06, 1998 at 13:11:20

You are here: irt.org | BBS | Re: SUBMIT button blocking [This BBS is closed]

Posted by Martin Webb on August 06, 1998 at 13:11:20:

In Reply to: SUBMIT button blocking posted by Jason B. on August 06, 1998 at 11:58:29:

: Is there any way, using Javascript, to disable the SUBMIT button (and block the form's submission) once it has been pressed the first time?

Yes:

<SCRIPT LANGUAGE="JavaScript">
var submitted = false;

function testFirst () {
if (submitted) return false;
submitted = true;
return true;
}
</SCRIPT>

<FORM onSubmit="return testFirst ()">

Follow-ups:

You are here: irt.org | BBS | Re: SUBMIT button blocking [This BBS is closed]

©2018 Martin Webb