robmoyer
02-21-2003, 02:03 PM
I hope someone can help me out on this, I am somewhat new to java. I have a simple order form on a webpage that I am setting up. When I press the "calculate order" button on my page, I want it to calculate tax only if the "state" text box is "NY".
I have a textbox named "State", a tax variable named "STax" and the following code:
SShipping = Math.round(SShipping);
SSubTotal =(SAmt1 + SShipping);
if form.State.value <> NY { STax = 0;
}else {
STax = Math.round((SAmt1)*.0800);
}
STotal =SSubTotal + STax;
form.Amt1.value = AddDecimal(SAmt1);
form.Shipping.value = AddDecimal(SShipping);
form.SubTotal.value = AddDecimal(SSubTotal);
form.Tax.value = AddDecimal(STax);
form.Total.value = AddDecimal(STotal);
I keep getting the following java error:
Error: Object expected
Code: 0
I thank you in advance for any help you can give. I am going to keep searching the forum for some clues.
I have a textbox named "State", a tax variable named "STax" and the following code:
SShipping = Math.round(SShipping);
SSubTotal =(SAmt1 + SShipping);
if form.State.value <> NY { STax = 0;
}else {
STax = Math.round((SAmt1)*.0800);
}
STotal =SSubTotal + STax;
form.Amt1.value = AddDecimal(SAmt1);
form.Shipping.value = AddDecimal(SShipping);
form.SubTotal.value = AddDecimal(SSubTotal);
form.Tax.value = AddDecimal(STax);
form.Total.value = AddDecimal(STotal);
I keep getting the following java error:
Error: Object expected
Code: 0
I thank you in advance for any help you can give. I am going to keep searching the forum for some clues.