Version compl�te: jsB@nk » Form » Validation » Accord avant publication
URL: https://www.javascriptbank.com/agree-before-posting.html
Parfois, vous mai nécessité de faire en sorte que vos visiteurs d'accord à des conditions avant de présenter leurs observations. Cet JavaScript permet de désactiver les champs de saisie jusqu'à ce qu'ils conviennent à vos conditions. Facilement adaptable.
Version compl�te: jsB@nk » Form » Validation » Accord avant publication
URL: https://www.javascriptbank.com/agree-before-posting.html
<script language="javascript"><!--// Created by: Savvy :: http://www.webdeveloper.com/forum/showthread.php?p=819275#post819275function enableob(o) { eval(o+".disabled = false"); }function disableob(o) { eval(o+".disabled = true"); }function toggleform(formstr,chkobstr,obstr) {var checked = eval(formstr+"."+chkobstr+".checked");var obs = obstr.split(","); for (i = 0; i < obs.length; i++) { obs[i] = formstr+"."+obs[i]; } if (checked == false) { for (i = 0; i < obs.length; i++) { disableob(obs[i]); } } else { for (i = 0; i < obs.length; i++) { enableob(obs[i]); } document.getElementById('pname').focus(); }}//--></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<form name="myform"><p>To accept the license terms for posting, click the checkbox below:<br><input name="mycheck" onclick="toggleform('document.myform','mycheck','pname,pemail,ptext')" type="checkbox"> I Accept</p><table><tbody><tr><td><b>Name:</b></td><td><input id="pname" name="pname" disabled="true" type="textbox"></td></tr><tr><td><b>E-Mail:</b></td><td><input name="pemail" disabled="true" type="textbox"></td></tr><tr><td><b>Post:</b></td><td><textarea name="ptext" disabled="true"></textarea></td></tr></tbody></table></form><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->