Agree To Terms Validation
Every so often I need a simple script to validate an “agree to terms” check box for an HTML form. Here is a simple script I came up with to perform that validation using javascript:
The code:
And a form to test with:
Every so often I need a simple script to validate an “agree to terms” check box for an HTML form. Here is a simple script I came up with to perform that validation using javascript:
The code:
And a form to test with:
I just updated my web site pages with the new Google Analytics tracking code snippet. It fixes a rare javascript pop-up error message by using a try-catch snippet. If you are familiar with object oriented programming languages, try-catch statements are nothing new. If you aren’t familiar… well the Google article gives you everything you need to know.
For more on javascript try catch statements:
http://www.w3schools.com/jS/js_try_catch.asp
Have you updated your snippets?