im kinda of nooobie when comes coding, here goes, hope can help. asked set payment page using 2 paypal buttons. when first arrive @ page buttons need disabled, until check checkbox, means have accepted tos, , there can continue on make payment. have tried find online nothing seems work me.
this html code...
<!--checkbox validation--> <input id="one" type="checkbox" /> have read , agree terms & conditions <!--paypal button--> <center> <table> <tr> <td> <form action="https://www.paypal.com/cgi-bin/webscr" onsubmit="return confsubmit();" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="2ru2nd26n2564"> <input type="image" src="http://graphicasylum.com/images/boton_100_chico.png" border="0" name="submit" alt="paypal, la forma más segura y rápida de pagar en línea."> <img alt="" border="0" src="https://www.paypalobjects.com/es_xc/i/scr/pixel.gif" width="1" height="1"> </form> </td> <td> <a class="submit disabled" <form action="https://www.paypal.com/cgi-bin/webscr" onsubmit="return confsubmit();" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="sak96y5cbtful"> <input type="image" src="http://graphicasylum.com/images/boton_50_chico.png" border="0" name="submit" alt="paypal, la forma más segura y rápida de pagar en línea."> <img alt="" border="0" src="https://www.paypalobjects.com/es_xc/i/scr/pixel.gif" width="1" height="1"></a> </form> </td> </tr> </table> </center>
and js code.
<script type="text/javascript">// <![cdata[ function confsubmit() { if(!document.getelementbyid("accept").checked) { alert("please read , accept terms , conditions in order continue."); return false; } } // ]]></script>
if i'm lost (witch i'm pretty sure am) i'm willing go direction make work! in advance help. :) had put 2 paypal buttons in tables because way knew how set them side side , centered on webpage.
at glance...
if(!document.getelementbyid("one").checked) {
Comments
Post a Comment