How do I add multiple instances of Javascript on one page?
I'm attempting to put several instances of Javascript code on the same page but it isn't working.
Here is the code that goes in the header...
<script type="text/javascript"> function toggleAccept() { var acceptLink = document.getElementById("accept"); var agreeCheckbox = document.getElementById("agreeCheckbox"); if (agreeCheckbox.checked) { acceptLink.onclick=function() { window.location=this.href + "&cbrblaccpt=true"; return false; } } else { acceptLink.onclick=function() { mustAccept(); return false; } } } function mustAccept() { window.alert("By clicking accept, you agree to the payment terms of this recurring product."); } cbrblaccpt </script>
<p align="center"><form action="#"><input type="checkbox" onchange="toggleAccept()" id="agreeCheckbox"> <label for="agreeCheckbox"><b>I understand that this product is billed on a monthly basis and that I can cancel my subscription at any time.</b></label></form></p> <p align="center"><a href="http://2-monthly.vicdorfman.pay.clickbank.net/?cbur=a" id="accept" onclick="mustAccept(); return false;"><img alt="" src="images/signup-37.jpg" style="border: 0px solid ; width: 350px; height: 147px;" /></a></p>
Please help!
Thanks,
Vic
Tired of fighting with WordPress to build the site you want? You shouldn't have to spend hours tweaking your website to bend to your will. Take the next step in your journey to WordPress mastery with wordpress4anyone.com
Professional Membership Site Setup (Great Client Feedback!)
Free Report - What You Need to Know Before Creating a Membership Site