Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why am I losing decimal
Message
From
13/07/2001 11:39:22
Christian Bellavance
Université du Québec à Hull
Hull, Quebec, Canada
 
 
To
All
General information
Forum:
Internet
Category:
Javascript
Title:
Why am I losing decimal
Miscellaneous
Thread ID:
00530310
Message ID:
00530310
Views:
60
Hi, why am I losing decimal in that function

function UpdateAmount()
{
var tmp;
var mnt;

myName = "myControlName";
mnt = parseFloat(document.myForm.myTotalAmount.value);
mnt = mnt + parseFloat(document.myForm.elements(myName).value);
document.myForm.myTotalAmount.value = mnt;
}

The total are calculated correctly but on the web page I lose decimal. Why?

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform