»
EnglishFrenchVietnamese

Print - Agree Before Entry - JavaScriptBank.com

Full version: jsB@nk » Form » Agree Before Entry
URL: https://www.javascriptbank.com/agree-before-entry.html

Agree Before Entry © JavaScriptBank.comJavaScript will only let you enter your name in this form if you indicate you agree to the terms by first clicking the I Agree radio button. If you agree, you can enter your name. But, if you disagree, you will not be able to enter or edit your name. When you disagree, the box is 'locked.' Useful if you require your visitors to accept a disclaimer before downloading software or visiting a section of your members-only site.

Full version: jsB@nk » Form » Agree Before Entry
URL: https://www.javascriptbank.com/agree-before-entry.html



JavaScript
<SCRIPT LANGUAGE="JavaScript"><!-- Beginagree = 0;  // 0 means 'no', 1 means 'yes'//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name=enableform><input type=radio name='enable' value='agree' onClick="agree=1; document.enableform.box.focus();">I agree<br><input type=radio name='enable' value='disagree' onClick="agree=0; document.enableform.box.value='';">I disagree<br>Please enter your name:  <input type=text name=box onFocus="if (!agree)this.blur();" onChange="if (!agree)this.value='';" size=12><br><br><input type=submit value="Done!"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->