This is my code:
---------------------------------------------------------------------------------
IFS.#subform[10].fldEnvelopeOrder1[6]::change - (JavaScript, client)
if(this.rawValue > 1){
IFS.#subform[10].fldEnvelopeOrderColor[0] = "Yellow";
}
else if(this.rawValue < 1){
IFS.#subform[10].fldEnvelopeOrderColor[0] = "";
}
-------------------------------------------------------------------------------
My goal is the following:
The default have of fldEnvelopeOrder1[6] is 0. If the field fldEnvelopeOrder1[6] changes to a value greater than 1 then the Drop down field fldEnvelopeOrderColor[0]should equal "Yellow". Otherwise "".
Any leads with figuring this out would be appreciated. It might be that the trigger should maybe be "Enter" but I'm not sure.
Thanks.
The "this.rawValue" property does not show the changed value. The newly entered data is in the event object.
For example:
if(Number(xfa.event.newText) > 1)
{
...
}
Alternatively you could use the validate event, which is called when data is committed to the field. But you'll need to return a true false value, because that's what Acrobat expects from the validate event. Unless you need to do real validation just put "true;" as the last line of the script.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script