DoctorGonzo
Programmer
Hi guys,
I have the following code in the ONBLUR event of a field
FIELD3.value = FIELD2.value - FIELD1.value
this works fine, but if the sum is 13.20 - 12.50 the resulting answer is 0.6999999999999993.
What I want is to round up to 2 decimal places. it's currency you see.... I want the answer to be 0.70 (70p)
Can anyone help? I've seen so many conflicting methods... parse.float's and math.round.s etc...
Many thanks!
Gonzo
I have the following code in the ONBLUR event of a field
FIELD3.value = FIELD2.value - FIELD1.value
this works fine, but if the sum is 13.20 - 12.50 the resulting answer is 0.6999999999999993.
What I want is to round up to 2 decimal places. it's currency you see.... I want the answer to be 0.70 (70p)
Can anyone help? I've seen so many conflicting methods... parse.float's and math.round.s etc...
Many thanks!
Gonzo