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

If Value range

nphil070
Registered: Jan 15 2008
Posts: 6

Hello,

I am having trouble scripting a simple calcaulation.

After filling out a survey the user has a total score number value (1-100) calculated. What I would like to do is depending on your value, it would determine by making text appear what range you fell into (1-39, 40-80, 80-100)

If anyone could help it would be very much appreciated!

Neil

StevenD
Registered: Oct 6 2006
Posts: 368
var myVal = 21;

if(myVal >= 1 && myVal <= 39)
{
xfa.host.messageBox("Yes the number is within the range of 1-39");
}

The above script checks to see if the value falls within a range of 1-39 and if it does then a message alert saying so will be displayed.

StevenD