I'm using Designer 7.0, and have tried to enter a javascript calculation event for a check box field. The purpose is to calculate a 10% penalty for late remittance. I was able to use the following statement:
if (this.rawValue == true)
{Penalty.rawValue = 10;}
else {Penalty.rawValue = 0;}
It seems like this syntax only works for constant values, not calculated amounts (I tried calculating 10% of the remittance amount (Penalty.rawValue = remittanceamount/10), but that didn't work. I appreciate any feedback that you may have.
If "remittanceamount" is the name of a field then the value of "remittanceamount" is
remittanceamount.rawValue;
This is the issue with the calculation.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script