NaN w/ Printing Results In Same Page
I have a form that has 83 different items, and when you input a quantity in a textbox, the jscript spits out the cost in another textbox.
But; the first 80 items get charged tax, so it looks like this:
1
...
80
subtotal:
tax:
total:
the last three do not get taxed, so it looks like this:
81
82
83
total:
the two totals are added, to produce a grand total:
grand total:
my main problem is that the second total and grand total show up as NaN;
the code that i think may be causing the problems is:
document.orderform.OrderTotala.value = Currency(ordertotala);
tax = ordertotala * .0825
document.orderform.secondtotal.value = Currency(secondtotal);
document.orderform.Tax.value = Currency(tax);
document.orderform.GrandTotal.value = Currency(ordertotala + tax);
document.orderform.BigGrandTotal.value = Currency(GrandTotal + secondtotal);
The Form
Thanks a lot!
But; the first 80 items get charged tax, so it looks like this:
1
...
80
subtotal:
tax:
total:
the last three do not get taxed, so it looks like this:
81
82
83
total:
the two totals are added, to produce a grand total:
grand total:
my main problem is that the second total and grand total show up as NaN;
the code that i think may be causing the problems is:
document.orderform.OrderTotala.value = Currency(ordertotala);
tax = ordertotala * .0825
document.orderform.secondtotal.value = Currency(secondtotal);
document.orderform.Tax.value = Currency(tax);
document.orderform.GrandTotal.value = Currency(ordertotala + tax);
document.orderform.BigGrandTotal.value = Currency(GrandTotal + secondtotal);
The Form
Thanks a lot!
