Click to See Complete Forum and Search --> : Help for parseFloat


loshite
12-15-2003, 04:01 AM
Hi, everyone

Please, help me with this problem.

I call the function parseFloat with an string argument which is a number with 2 digits after the point. And sometimes the result is a number with many more symbols avter the point. Can you help me?

Thanks in advance.

Best Regards,
Lo****e


P.S. Here goes the code in which I use the paresFloat function:

document.form.totalBillSum1.value = parseFloat(document.form.totalBillSum1.value) + parseFloat(field.sum);
document.form.totalBillSum2.value = parseFloat(document.form.totalBillSum1.value);
posField = eval("document.form.Pos"+field.posId);
posField.value = parseFloat(posField.value) + parseFloat(field.sum);

fredmv
12-15-2003, 04:02 AM
Welcome to the forums.

Do you have a link in which has an example of this code running or the code for the HTML form possibly?