Terms of Use Javascript

2

Posted by: Jennifer Zelazny on January 31, 2007

Categorized: HOWTOs, Javascript, SDAC Blog

Tagged: , ,

Need: A script that a client could easily call within a URL to force the users to agree to their terms of use before downloading a file.

Solution:Either put the following code in the header, or in a .js file to include:

function terms(){
	question = confirm("Terms of Use text here")
 if (question !="0"){
		document.URL()
	}
  }

Then, call this code in your HTML code by using:

<a href="http://www.sandboxdev.com" />Download Link</a>

2 Responses to “Terms of Use Javascript”

  1. Good job – I’m sure this one will come in handy in the future.

  2. jzelazny says:

    I am surprised there are not more articles available on this – but I am always happy to share.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>