I am currently using a method to make sure users accept the T&C and the Warnings of my website before they order, the current method simply hides the payment options until the two boxes are checked.
But my client doesn’t like that, instead he wants the payment options to always be there, but if they try to click buy without checking the two boxes first it will show a warning box saying ‘please accept T&C and the Warnings’.
The page where the payment boxes can be found are: http://rickydawn.co.uk/wolly/subscribe.php
All of the code I currently use can be found in the source!
How would I go about this? I have this script that will make a popup appear when paypal button is checked, but how can I make it only appear when the boxes are not checked??
<script type="text/javascript">
function confSubmit()
{
return confirm("Have you read the Terms and Conditions of sale?");
}
</script>
</head>
<body>
<form onsubmit="return confSubmit();" target="paypal"
action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="0000000">
<table>
<tr><td><input type="hidden" name="on0" value="Price + postage">Price +
postage</td></tr><tr><td><select name="os0">
<option value="Price + postage France">Price + postage France €00,00</option>
<option value="Price + postage CEE or Switzerland">Price + postage CEE or Switzerland
€00,00</option>
<option value="Price + postage Other Countries">Price + postage Other Countries
€00,00</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="EUR">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif" name="submit"
alt="PayPal - The safer, easier way to pay online!" value="Submit Form">
</form>
You find the checked state of the TnC checkbox and execute the confirm pop-up based on its checked state:
You can do the same with the other checkbox as needed…
Edit:
In order to get rid of the “Cancel” modify your function like so (you should probably rename the function since it will no longer be a confirm dialog):