Terms of Use Javascript

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://jzelazny.wpengine.com" />Download Link</a>

About the Author...

Jennifer Zelazny

I am a Penn State alumni, avid golfer, kick boxer, volunteer, and Chicagoland WordPress developer who always enjoys a refreshing Coca-Cola.