Navigation Menu
Alphabetical Listing
Site Contents

Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

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


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

15. From: michael storer
accept terns of use javascript
04/08/2009 09:49:08

I found your "accept terms" javascript on JavaScript Forum.
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.

1.) Will this script do that?
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?

I appreciate your knowledge and thank you for your help!

Michael Storer, Los Angeles

14. From: David
Nice code
12/16/2008 01:20:18

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

8. From: Ken Johnson
Accept terms
10/22/2008 10:30:08

Code was just what I've been looking, except need the exit button to link to another page as the continue does

Any clues anyone

9. From: Lee (Admin)
10/31/2008 12:47:02

Sure, just change the URL in the onclick event, e.g.,

onclick="document.location.href='anotherPage.html';"

12. From: C Wayne
where does it go
06/23/2008 10:29:08

I love the script, but how do I get it redirect back to the site they came from and how do I capture an IP of the person clicking continue to verify it was that particular person if an issues arises.

13. From: Lee (Admin)
10/31/2008 14:51:35

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';">

7. From: Angela
correction...
05/29/2008 10:18:37

If you are wanting your form to go to another page, you will want to change "POST" to "GET" where you specify the form action.

10. From: Buffalo Parrot
04/22/2008 18:14:49

Where do I put the URLs for the buttons?

11. From: Lee (Admin)
10/31/2008 14:15:20

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.

6. From: farah
thanx
03/06/2008 20:39:07

this r great ..thanx 4 ur help!!

next comments...

Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.