Hi, Submit Once

September 11, 2003 by Steve V

I don't have a complete answer, but here is a script that will enable you to "Disable" the Submit button once it has been depressed.

Good Luck

I use it, Works MINT

The code comes from the following site.

http://www.dynamicdrive.com/dynamicindex11/submitonce.htm


Step 1: Insert the below validation code into the <head> of your page:


<script>

/*
Submit Once form validation-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj="theform".elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>


Step 2: Inside the form in question, add the part in red to the <FORM> tag, as follows:

<form method="POST" onSubmit="submitonce(this)">

 

 

I replied to an answer for this

November 8, 2004 by Chris Charlton
Check out my reply about this same topic Basically, Yaromat has a free extension called Check Form MX, also if you wanna get a whole suite you can get WebAssist's Validation Toolkit for DW.