how to get the values dynamically in js

Posted by jeessy on Stack Overflow See other posts from Stack Overflow or by jeessy
Published on 2011-01-05T08:08:37Z Indexed on 2011/01/05 8:53 UTC
Read the original article Hit count: 172

Filed under:
|
|
|
|

hi having problem with my id iam making my website for health product. already we have a 10 products with corresponding amounts in this section customer choose the product through drop down box.

in next we are getting service charges from customer by clicking radio buttons.

we have a three radio buttons with name=add and three amount value like 5$ 7$ 9$. It is working fine.

for example: customer selected 3 produts in the sense that total amount around 20$ after customer clicks this radio button(any) and submit button that amount will add with totally in next page ie 25$

what i want is that radio button amount should add with get payment then display the page dynamically.

function checkRadio (frmName, rbGroupName) {
 var radios = document[frmName].elements[rbGroupName];
 for (var i=0; i < radios.length; i++) {
      if(radios[i].checked) {
        return true;
     }
 }
 return false;
}

$(document).ready(function(){ 
          $("input[name='rmr']").click(function() {
           updatePayment($(this).val());
           if (!!$(this).attr("checked") == true) {
             $("#finalamount").html( parseInt($("#totalamount").val(), 10) * parseInt($(this).val(), 10));
         }
     });
}

this code is right or wrong. thanks in adv

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript