agree before entry




JavaScript Source Code 3000: Forms: Agree Before Entry






































Agree Before Entry







JavaScript 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.






You can only enter your name if you agree to the terms. (just a demo)

I agree
I disagree

Please enter your name:











JavaScript Source Code 3000: Forms: Agree Before Entry
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!





    





<!-- TWO STEPS TO INSTALL AGREE BEFORE ENTRY:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<! >
<! >

<!-- Begin

agree = 0; // 0 means 'no', 1 means 'yes'

// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<form name=enableform>
You can only enter your name if you agree to the terms. (just a demo)<br>
<br>
<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>
</center>



<!-- Script Size: 1.12 KB -->














Wyszukiwarka

Podobne podstrony:
entry
entry
entry
entry
function ldap next entry
entry
entry
entry
entry
entry
entry
entry
entry
entry
entry
entry
entry

więcej podobnych podstron