Hi Guys
Forgive me moderators for this second post but I think maybe my first post was unclear.
I have the following calculation and want to use it to calculate the rest of the form.
<html><head>
<script>
function calc(){
var chkd;
var count = 0;
if(document.qtyFrm.c1.checked){chkd=document.qtyFrm.c1.value; count=count+1;}
if(document.qtyFrm.c2.checked){chkd=document.qtyFrm.c2.value; count=count+1;}
if(count==2){alert(“Check only one, please.”); return false;}
document.qtyFrm.qtyTotal.value=parseInt(document.qtyFrm.qty.value)*chkd;
}
</script>
</head><body>
<form name=”qtyFrm”>
<p>
<input type=text name=”qty” onkeypress=”calc()”>
<br>
130:
<input type=checkbox name=”c1″ value=”130″ onclick=”return calc()”>
<br>
1300:
<input type=checkbox name=”c2″ value=”1300″ onclick=”return calc()”>
<br>
<input type=text name=”qtyTotal”>
</p>
<p>
<input type=”text” name=”textfield”>
<br>
<input type=”checkbox” name=”checkbox” value=”checkbox”>
<br>
<input type=”checkbox” name=”checkbox2″ value=”checkbox”>
<br>
<input type=”text” name=”textfield2″>
</p>
</form></body></html>
How do I calculate the last fields and checkboxes using the above calculation?
Thank you in advance for your assistance.
Kind regards
Darryn