View Full Version : need to keep trailing zeros, Fixed(2) not working

10-10-2008, 12:49 AM
Posted this earlier and got a response, but it won't work. I am really stuck and hope someone can help.

Have an order form: each row contains quantity (input), base price (constant), tax (constant), subtotal. Here is the math code:

for (var p in output_data) {$('#'+p).html(Math.round(output_data[p]*100)/100);}

The response I got was to tag on
.toFixed(2) so here's what I did:

for (var p in output_data) {('#'+p).html(Math.round(output_data[p]*100)/100).toFixed(2);}

The tax is showing up in the subtotal column and I'm losing trailing zeros. Here's the page: http://www.interactivesystems.biz/is/tvplay.php


(folder is pass protected). I would really appreciate some assistance with this, hope you can hellp.