SDAC Blog

Check out our blog for WordPress updates, WordPress plugin reviews, and general web development hints.

hr
hr

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:

JAVASCRIPT:
<script type="text/javascript">
function terms(){
    question = confirm("Terms of Use text here")
 if (question !="0"){
        document.URL()
    }
  }
</script>

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

HTML:
<a href="http://www.sandboxdev.com" onclick="terms();return false;" value="Display Terms of Use" />Download Link</a>

hr

Comments/Pingbacks/Trackbacks

Add a Comment or trackback from your own site.

2 Responses

  1. Doug Blatti

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

  2. jzelazny

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

Leave a Reply

separate