These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculation event based on check box

shinymcshires
Registered: Jan 2 2008
Posts: 4

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.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I think you have a couple of issues. First. Your script should be in the Click event for the checkbox. The calculate event is called every time any field on the form changes.

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