Math on a Form
I am trying to get total to calc on a form.
I have three fields that I want to add together and display in the Total field.
Sub-Total:
Shipping:
Sales Tax:
Total:
On the first three fields I use onChange="CalcTotal()"
For this function I am using:
SubAmt = document.form1.SubTotal.value;
ShipAmt = document.form1.Ship.value;
TaxAmt = document.form1.Tax.value;
GrandTotal = SubAmt + ShipAmt + TaxAmt;
document.form1.TotalPrice.value = GrandTotal;
If I enter 1 in each of the three fields my total is 111. How do I make it return 3?
Thanks,
David
|