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

Mileage frustration

jetbtwo
Registered: Sep 28 2007
Posts: 14

I have created a Mileage form. I created an XML file with all the appropriate destinations and miles and imported that into Designer. I have a drop down box that allows the user to choose the destination and the appropriate mileage populates the adjacent box. I need to have a round trip check box next to that field so that when checked the mileage doubles and is placed in the total miles field next to that. (or isn't doubled if not checked and the regular mileage is placed in the total miles column.)
  
Date - Destination - Mileage - Round Trip - Total Miles
  
*My script for the check box that doubles mileage*
 
if (this.rawValue == "1") then
 
NumericField3.rawValue == Mileage.rawValue *= 2

else
 
NumericField3.rawValue == Mileage.rawValue
 
Last edited by jetbtwo (Today 15:59:07)

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You've got a codding error in your code

NumericField3.rawValue == Mileage.rawValue *= 2

In this line the "*=" is unnecessary because it will change the "Mileage Field". It's also unnecessary to put the "1" in quotes in the "if" statement.

Other than these issues there's nothing obviously wrong with your code. In fact you never stated a problem. So what's the problem?

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script