Menu
Did a search here…
Tried google…
My js:
[Quote]
function setSubTotal(obj)
{
var frm = obj.form;
var fvariable1 = parseFloat(frm.variable1.value);
var fvariable2 = parseFloat(frm.variable2.value);
…..
…..
if(isNaN(fvariable1))
{
frm.subtotal.value = 0;
}
else
{
frm.subtotal.value = (fvariable1) + (fvariable2) + …..;
}
}
My html:
[Quote]
<input name=”subtotal” type=”text” id=”subtotal” size=”4″ onChange=”setSubTotal(this)”>
I’ve used this pattern before for other calculations and it works fine.
This one doesn’t. What am I missing?
Thanks.