Hi!
value property is of character type, so probbaly lose is during the conversion. Try to convert number manually.
>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.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.