Accept Terms | JavaScriptSource

Accept Terms

Colin PC May 21, 2001

General

This script allows your visitors to accept your terms and conditions before proceeding by checking a box. If they don't agree, an exit button will takes them to a designated page.


I accept:

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: acceptTerms


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(15 comments)

I found your "accept terms" javascript on JavaScript Forum.[br /]I need a simple client side only script to make sure those who access my pages are over age 18. Once they check the box, they should have full access to my site for good, but if they send an inside page to a friend, the friend should automatically be redirected to the index page with the "accept terms" form.[br /][br /]1.) Will this script do that?[br /]2.) I have a list of page numbers that users can click on to go to any page they want, What script do I need to allow them to go to any selected page without having to recheck the terms of agreement box each time?[br /][br /]I appreciate your knowledge and thank you for your help![br /][br /]Michael Storer, Los Angeles

michael storer Apr 8, 2009

This is some neat code- will be suggesting it to my members.

David Dec 15, 2008

Set the script you want to use for processing here: action="yourFormScript.php". Then, set the URL you want to script directed to for the exit button here: onclick="document.location.href='yourFile.html';">

Lee Oct 31, 2008

URLs? If you mean to add it to a script, you would need to add the processing script in the "action" tag on the form.

Lee Oct 31, 2008

Sure, just change the URL in the onclick event, e.g.,[br /][br /]onclick="document.location.href='anotherPage.html';"

Lee Oct 31, 2008