I am trying to recalculate some fields in a form (convert them to currency and add taxes) but I am stumped. What I have works in IE7 but not FF3. I have the following:
I have the user enter a number in a form (called payform) and a field called “amount”. There are also fields called “tax” and “total”.
the user enters the “amount” and presses a button “calculate”. The “onclick” method of the button calls a function Calculate_values(payform.amount.value). The function is defined in the header as:
function Calculate_values(Atext)
{
var A = parseFloat(Atext);
payform.amount.value=A;
payform.tax.value = A * 0.05775;
payform.total.value= A
}
This works fine in IE7, but not in FF3.
I think FF can not identify the form field to enter the values into. How do I do that?