Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Forms, Radio, Buttons, Check Box >> Accept Terms And Conditions


Code Snippet </> Info


Snippet Name: Accept Terms And Conditions

Description: Add a user must accept terms and conditions check box to your forms, or make it a doorway agreement before forwarding the visitor code snippet to your web page.
Compatible Modern Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Example: View Code Demo

Note:

Author: SnapBuilder <snippets@snapbuilder.com>

Last Modified: 2015-12-13 06:40:47

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.1 Transitional//EN"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Accept Terms And Conditions</title> <style> html {margin:0; padding:0;} BODY {font-family:verdana,arial,ms sans serif; font-size:100%; background-color:#ffffff; color:#000000; text-shadow:0px 1px 1px rgba(0,0,0,0.2);} a {color:#69C;text-decoration:none;} a:hover {color:#F60; text-decoration:underline;} #wrapper {margin:0; padding:15px 15px 15px 15px;} </style> </head> <body> <div id="wrapper"> <h3>Accept Terms And Conditions</h3> <p>Simply agree to the terms to see a live URL forwarding of this code snippet. If you do not agree to the terms and exit, you will be forwarded some where else.</p> <script type="text/javascript"> <!-- // Begin Accept Terms And Conditions // == This Script Free To Use Providing This Notice Remains == // // == This Script Has Been Found In The http://snapbuilder.com Free Public Codes Library == // // == Created by: SnapBuilder : http://snapbuilder.com : Creative Commons License 3.0+ == // function snapSubmit() { if(!document.getElementById("one").checked) { alert("You must agree to the terms in order to proceed."); return false; } } //--> </script> <p><b>By submitting, I agree that all info entered was done accurately and truthfully, or whatever you want to say. <br><br> <table> <tr> <td><!-- insert the URL path to your page the visitor is forwarded to after agreeing to the terms in form onSubmit="return snapSubmit();" action="http://domain.com/folder/page.html" method="post" --> <form onSubmit="return snapSubmit();" action="agree_to_terms_landing.html" method="post"><b>I accept:</b> <input id="one" type="checkbox" /></td> <td><input type="submit" name="" value="I Agree To Terms"></form></td> <td><form name="two"> <!-- insert the URL path to the page the visitor is forwarded too when exiting / not agreeing to the terms. --> <input type="button" value="Exit" onclick="document.location.href='http://snapbuilder.com';"> </form></td> </tr> </table> </div> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library