Acrobat 5
Trying to determine the content of a given field (e.g. "state") and depending upon the state, apply a tax to another field ("Total of page 2") and then place the tax amount into a seperate field called "Sales Tax". One version of the code I've tried and does not work is as follows:
var a = this.getField("state");
var b = this.getField("Total of page 2");
var c = 0.07;
var tax = "";
if (a == "Kansas" || a == "KS") {tax = b.value * c};
event.value = tax;
The code to calculate and place the result into a field is not a problem , however, when I try testing content of another field by using an "If" statement and use the above syntax, something is awry.
Thanks in advance for any help!
var a = getField("state").value;
George