启用带有复选框的PayPal按钮
Enabling PayPal buttons with a checkbox
说到编码,我有点不喜欢,但说到这里,希望有人能帮忙。我被要求使用两个贝宝按钮建立一个支付页面。当你第一次到达页面时,按钮需要被禁用,直到他们选中复选框,这基本上意味着他们已经接受了ToS,并且可以继续付款。我已经尝试了所有我能在网上找到的东西,但似乎没有什么对我有用。
这是我的html代码。。。
<!--CheckBox Validation-->
<input id="one" type="checkbox" /> I have read and agree to the 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>
这是我的js代码。
<script type="text/javascript">// <![CDATA[
function confSubmit() {
if(!document.getElementById("accept").checked) {
alert("Please read and accept the Terms and Conditions in order to continue.");
return false;
}
} // ]]></script>
如果我完全迷失了方向(女巫,我很确定我是),我愿意走另一个方向来实现这一目标!提前感谢您的帮助。:)此外,我不得不把我的2个贝宝按钮放在表格中,因为这是我知道如何将它们并排设置并以网页为中心的唯一方法。
一览。。。
if(!document.getElementById("one").checked) {
相关文章:
- PayPal按钮是否有一个简单的选项,其中金额基于一些用户输入
- 使用PayPal按钮登录 JavaScript 代码生成器验证错误
- PayPal按钮,允许客户为金额范围选择具有不同价格的产品数量
- 我需要创建一个PayPal“立即付款”按钮,该按钮将根据选定的复选框识别总价
- 如何将 jQuery 添加到在PayPal对象之前触发的提交按钮
- 如果输入字段不是 40 个字符,则隐藏付款表单PayPal提交按钮
- 单击按钮打开数字流PayPal框
- PayPal捐赠按钮在 chrome://extensions/ 中不起作用(选项V2)
- 动态加密PayPal按钮
- HTML 选择语句和按钮不适用于PayPal
- Paypal按钮和jquery结账
- 如何在复选框激活时禁用/启用PayPal按钮
- 发送用<输入类型=“;范围“>(滑块)到Paypal按钮's的价格值<输入类型=“;隐藏的“;
- 启用带有复选框的PayPal按钮
- 使用payPal按钮,用户可以在付款前更改价格
- PayPal's按钮管理器API与javascript
- PayPal按钮使用沙盒不显示
- 在PayPal按钮重定向之前完成AJAX调用
- Paypal按钮预加载器
- Paypal按钮使用AngularJS一次提交多个项目