Hi,
Im trying to subtract 3 from the value If the radio button is checked. However, its not working.
<script type="text/javascript">
function calcShipping()
{
var txtWeight, pound1, pound2, pound3, freq, notfreq, freq1;
var values = " ";
freq1 = 3;
pound1 = 5;
pound2 = 10;
pound3 = 15;
txWeight = document.getElementById("txtWeight").value;
txWeight=parseInt(txWeight);
if (txWeight < 1)
{document.write("Your cost is " + pound1 + "$.") };
if (txWeight >= 1 & txWeight < 3)
{document.write("Your cost is " + pound2 + "$.") };
if (txWeight >= 3 & txWeight <= 5)
{document.write("Your cost is " + pound3 + "$.") };
if (document.getElementById("freq").checked = true){
document.write(" Your cost is " + (txtWeight.result - freq1) + "$.");
}
else if (document.getElementById("notfreq").checked){
document.write("Your cost is " + (txtWeight.value) + "$.");
}
}
</script>