witold
07-26-2003, 05:03 PM
Hi,
I'm trying to do a simple computation. All values come from form fields. Yet, it seems that I get a string instead of a figure.
---------------
Here's my coding:
//f3 and f4 are names of 2 different forms
var price = f3.m3.value;
var qty = f4.qty.value;
f4.initPrice.value = price * qty;
f4.promoPrice.value = 10;
f4.netPrice.value = f4.initPrice.value-(f4.initPrice.value * f4.promoPrice.value / 100);
f4.tax.value = f4.netPrice.value * 0.22;
f4.grosPrice.value = f4.netPrice.value + f4.tax.value;
--------------
"f4.grosPrice.value" is where the problem occurs
witold
I'm trying to do a simple computation. All values come from form fields. Yet, it seems that I get a string instead of a figure.
---------------
Here's my coding:
//f3 and f4 are names of 2 different forms
var price = f3.m3.value;
var qty = f4.qty.value;
f4.initPrice.value = price * qty;
f4.promoPrice.value = 10;
f4.netPrice.value = f4.initPrice.value-(f4.initPrice.value * f4.promoPrice.value / 100);
f4.tax.value = f4.netPrice.value * 0.22;
f4.grosPrice.value = f4.netPrice.value + f4.tax.value;
--------------
"f4.grosPrice.value" is where the problem occurs
witold