problem with jquery for add cart button

Posted by jessy on Stack Overflow See other posts from Stack Overflow or by jessy
Published on 2011-01-04T05:51:11Z Indexed on 2011/01/04 5:53 UTC
Read the original article Hit count: 172

Filed under:
|
|
|
|

hi i have a problem with displaying amount.i have the page called make payment in this page i made three radio buttons, if i click the button that amount must add with addcart like a product.

<form id='theForm'>
<input type="hidden" name="totalamount" id="totalamount" value="1" />

input type="radio" name="rmr" id="payment1" value="3" onclick="updatepayment(this.value)" /> input type="radio" name="rmr" id="payment2" value="5.5" onclick="updatepayment(this.value)"/> input type="radio" name="rmr" id="payment4" value="10" onclick="updatepayment(this.value)"/> div id="finalamount"> /div>

i think that problem is my js script. if i click that button there is no response. how do i solve that problem you guys can give me any idea $(document).ready(function() { $(".cart :radio[name='rmr']").add(".cart :radio[name='rmr']").each(function() { $(this).click(function() { $(".cart :radio[name='rmr']").add(".cart :radio[name='rmr']").each(function() { $(this).attr("checked", false); }); $(this).attr("checked", true); }); }); }) function updatePayment(val) { $("").html("updatePayment(" + val + ")").appendTo(document.body); }

thanks.have a nice day

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript