This topic is locked

Javascript number formatting

2/6/2014 1:29:06 PM
PHPRunner General questions
W
wclaren author

Hey Guys --
I have the following line in a Javascript onLoad event:
ctrlTax.setValue((ctrlSubtotal.getValue()) * ctrlTaxRate.getValue());
Math works fine, but I cannot get the displayed output to format with only 2 decimal points (nnn.nn vx nnn.nnnnnnn).

I have tried adding parseFloat() / parseInt() to the above line as well as toFixed(2)
PHPRunner 7.0 on linux, Win 7 on development machine.

Same results in Chrome, FireFox and IE.
Any help greatly appreciated!