I have the script below and am trying to figure out how to add a comma value for the 'thousand' place after the total has been calculated. Anyone know how I can accomplish this?
Thank you.Code:<script type="text/JavaScript"> function calculateCheck() { var op1=document.getElementsByName('form[swimclubmem1][]'); var op2=document.getElementsByName('form[swimclubmem2][]'); var result=document.getElementById('Total'); result.value=0; result.value=parseInt(result.value); for(i=0;i<op1.length;i++) if(op1[i].checked) result.value=parseInt(result.value)+parseInt(op1[i].value); for(i=0;i<op2.length;i++) if(op2[i].checked) result.value=parseInt(result.value)+parseInt(op2[i].value); } </script>



Reply With Quote


Bookmarks