I seek help on a script. I have a text field that calculates the sum of some text boxes. Then I have a combo box with three choices: A, B and C. The default value is A. What I would like to do is this: If the number in the text field is 0-9 I would like the combo box to switch to B without the user having to do anything. Then if the number in the text text field is 10 or greater, I would like the combo box to switch itself to C and maybe even turn a different color text.
Does this make sense?
This is the calculation script for the text field.
**************************
event.value = ... The calculation ...
vvar oComboFld = this.getField("MyCombo");
if((event.value > 0) && (event.value < 10))
{
oComboFld.value = "B";
oComboFld.fillColor = color.red;
}
else if(event.value >= 10)
{
oComboFld.value = "C";
oComboFld.fillColor = color.green;
}
else
{
oComboFld.value = "A";
oComboFld.fillColor = color.white;
}
*************************
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script