date validation
date validation
im looking for a way to validate entered date, prior to submitting the said information to another page. i've seen extensions that manages to do that, but u can get away with continuing to click the submit button.
date validation
im looking for a way to validate entered date, prior to submitting the said information to another page. i've seen extensions that manages to do that, but u can get away with continuing to click the submit button.
Comments
Hi, Submit Once
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
You must me logged in to write a comment.