I am using alot of Javascript for my Wall Calculator project,
I needed something that would round a number to a Currency format.
It was suggested I use a “toFixed()” command.
Well it works fine and even passes the W3C Validator for HTML 4.01, but now I’ve found that some older browsers will not accept it.
I’m having a hard time finding what I need at the W3C site, anyone have any recommendations?
Here’s an example of my code:
// calculate quantity subtotal
// calculate track quantity price
f.track_count_price_temporary =
(f.track_count.value
* 10
f.track_count_price.value =
f.track_count_price_temporary.toFixed(2);
reference:
[URL=http://www.epourania.com/wallcalc/wallcalc25.html]http://www.epourania.com/wallcalc/wallcalc25.html