when i click on the heckbox it reloads the page and just writes the sum on a blank page
radio or checkbox
Collapse
X
-
thanks for your help with all that, finally got it working and moving totals from page to page, i still have the same problem if you reset the form its not a problem but i was going to add a button to reset the total also but that does not want to work
the code for adding is now
i have a feeling i have just gone round in a circle to end up with the same problem thoughCode:function UpdateCost() { var sum = <%= runtotal %>; var gn, elem; for (i=0; i<5; i++) { gn = 'id'+i; elem = document.getElementById(gn); if (elem.checked == true) { sum += Number(elem.value); } } parseFloat(sum); document.getElementById('total').value = sum.toFixed(2); }Comment
Comment