views:

28

answers:

1

I want to be able to let people download stuff from the blog, like code for people to use. But I want to make sure people read the "License/Copyright" stuff before hand. It would say something like, "Check to agree to terms and conditions" and when they click it the download link is activated.

Bonus: records their IP address from where they downloaded it, and the time when they downloaded it.

A: 

If you are using jQuery, you could do something like this:

$('.checkbox').click(function() {
    if (this.checked) {
        window.location.href = "/url/to/download";
    }
    else {
        // error handling
    }
})

If you're not using jQuery let me know and I'll whip up a pure Javascript example.

Intelekshual
Sorry, no jQuery. I suppose I could add it in, I'm just very new and inexperienced with these sorts of things.