Version compl�te: jsB@nk » Form » Déposer une fois
URL: https://www.javascriptbank.com/submit-once.html
Avez-vous jamais reçu de multiples copies d'un seul forme soumission? Est-ce que vos visiteurs cliquent sur le soumettre bouton plus et plus, en espérant qu'il sera pressé le processus? Bien, JavaScript peut résoudre vos problèmes! Le script va empêcher le visiteur de la présentation de la forme après la première soumission. La validation sur le terrain de base aussi! Super!
Version compl�te: jsB@nk » Form » Déposer une fois
URL: https://www.javascriptbank.com/submit-once.html
<SCRIPT LANGUAGE="JavaScript"><!-- Beginvar submitcount=0;function reset() {document.emailform.name.value="";document.emailform.email.value="";document.emailform.comments.value="";}function checkFields() { // field validation -if ( (document.emailform.name.value=="") || // checks if fields are blank. (document.emailform.email.value=="") || // More validation scripts at (document.emailform.comments.value=="") ) // forms.javascriptsource.com { alert("Please enter your name, email, and comments then re-submit this form."); return false; }else { if (submitcount == 0) { submitcount++; return true; } else { alert("This form has already been submitted. Thanks!"); return false; } }}// End --></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<BODY OnLoad="reset()"><form method=post action="http://javascriptbank.com" name="emailform" onSubmit="return checkFields()"><input type=hidden name=to value="[email protected]"><input type=hidden name=subject value="Feedback Form"><pre>Your Name: <input type=text name="name">Your Email: <input type=text name="email">Comments?<textarea name="comments" wrap="virtual" rows="7" cols="45"></Textarea><input type=submit value="Submit Form!">[ Click the submit button twice to see the script in action ]</pre></form></BODY><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->