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

Help with a calculation

Jonathonc
Registered: Nov 14 2008
Posts: 6
Answered

So, I'm trying to figure out how to write a calculation in Acrobat 8, and its been a very long time since I've done anything with Javascript, so I'm having trouble coming up with it.

The following is what I would like in the correct coding format.

if A < B
use A
else
use B

Any help would be appreciated. Thanks.

My Product Information:
Acrobat Pro 8.0, Macintosh
Duniagdra
Registered: Sep 24 2008
Posts: 140
If you're just looking fo the higher value of the two, I used this when comparing two values and needing the highest:

event.value = Math.max(A,B);

Math.min should give what you're looking for.

Is this good enough?

Thanks in advance for any help provided,
Jim
The All Time Professional Amateur Hack

Jonathonc
Registered: Nov 14 2008
Posts: 6
That works perfectly. Thank you.