I received this code to help me out with math function on a page...
Problem is, when it puts the value into the tfees box, it comes out like 232.5 instead of 232.50
Can anyone tell me how to fix this?
function doMath() {
var one = eval(document.warr.costs.value)
var two = eval(document.warr.cfee.value)
var three = eval(document.warr.wfee.value)
var prod = one + two + three
document.warr.tfees.value=custRound(prod,2);
}
function custRound(x,places) {
return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}
thanks
Rob