Answered
Okay...so I ran this script through the debugger and everything brings a result, but when I copy and paste to the calculate tab's javascript, it keeps giving me an error. Can anyone see the problem? I'm a novice, and I'm trying to learn javascript through trial and error using the debugger.
if (this.getField("FS1").value> “7200”
event.value = 208.75;
else if (this.getField("FS1").value> “3600”
event.value = 154.30;
else if (this.getField("FS1").value> “2000”
event.value = 136.15;
else if (this.getField("FS1").value> “0”
event.value = 99.85;
else
event.value = “”;
Thanks,
Renee
The tutorial on writing conditional statements linked below might be helpful. Running each line of code in the debugger separately I see that missing ) after condition and invalid syntax error messages. Your parentheses are not balanced and numerical values should not be quoted.
http://www.acrobatusers.com/tutorials/conditional-execution
Hope this helps,
Dimitri
WindJack Solutions
www.pdfscirpting.com
www.windjack.com
Dimitri Munkirs
WindJack Solutions
pdfscripting.com