I found what you are looking for. Put the code below into the <head> section of your page.
Code:
<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>
Then put this on the form that you want it to work on.
Code:
<form method="POST" onSubmit="submitonce(this)">
This will disable the Submit button once clicked, process the page without going somewhere else and display an alert message to the user. To see how it works, go here:
http://www.dynamicdrive.com/dynamici...submitonce.htm
Hope this helps.
Bookmarks