Hi,
I'm fairly new to JavaScript and I'm trying to use the parseMoney() or parseDec() methods to achieve 2 decimal places on my calculations. Both give me an "object required" error, although everything calculates and displays fine if I don't use these methods. Here's the code I've tried:
document.form_name.field_name.value = parseMoney(calculated_total);
document.form_name.field_name.value = parseDec(calculated_total, 2);
Can anyone tell me what I'm doing wrong?
Thanks very much!
I'm fairly new to JavaScript and I'm trying to use the parseMoney() or parseDec() methods to achieve 2 decimal places on my calculations. Both give me an "object required" error, although everything calculates and displays fine if I don't use these methods. Here's the code I've tried:
document.form_name.field_name.value = parseMoney(calculated_total);
document.form_name.field_name.value = parseDec(calculated_total, 2);
Can anyone tell me what I'm doing wrong?
Thanks very much!