ACCEPT
TERMS OF USE |
Does your form contain an "Accept terms" section users must agree to before submitting the form? If so, this script helps enforce it, by disabling the submit button (in IE4+ and NS6+) or process (all other browsers) until he/she checks a box indicating compliance. » This script was made possible by: Dynamic Drive ! |
EXAMPLE |
CODE (s) |
========================================================== Step 1: Simply add the below script to the <HEAD> of your page: <script> //"Accept terms" form submission- By Dynamic Drive var checkobj function agreesubmit(el){ function defaultagree(el){ </script> ========================================================== Step 2: Insert the below sample form onto your page, which also demonstrates how to associate the script with your own form: <form name="agreeform" onSubmit="return defaultagree(this)"> <script> <p align="center"><font face="Arial" size="-2">Free
DHTML scripts provided by<br> ========================================================== As shown, to integrate the script to your form, 1) Give both your FORM and the checkbox a name 2) Inside both these two tags, insert the "extra" code 3) Finally in the script that follows the form, change the two names referenced to your form's name. ========================================================== |