I picked up a copy and paste script for a javascript button – I have it say, “Order Here” but the user has to click an “agree to terms of use” box before they can proceed to order.
The script works great, but my 3rd party payment processor requires it the button opens in a new window. I have an idea, but am not seeming to get the code in the right location:
Can someone tell me what code and where to put it? Please indicate if there are spaces that need to be left.
Here is my code that I have in the heading part with www.XXX.com given as the example:
<script language=”JavaScript”>
function purchase()
{
if (window.document.the_form.question.checked == true)
{
document.location.href = “
}
else {
alert(“Please Check the Box to Signify Agreement of Our Terms of Use.”);
}
}
</script>
Thanks in advance – Tressa