Hi all,
I am not so good with Javascript or FormCalc. I am mostly a VB6 programmer. I have attempted a number of different expressions and statements to get my Numeric Field value to change color when it meets a condition. For example;
If TotalScore.value < 70 then
Totalscore.value.fontcolor = Red
Else
TotalScore.value.fontcolor = Blue
End If
I know this isn't proper script, but displays what i am trying to achieve. I have spent countless hours researching this probably simple task. However, I have
not been able to find a javascript example to make this happen. By the way in the editor Event drop down menu, which do I select Change, Keydown, Initialize, Validate? I would greatly appreciate the help. It's the last item left to complete my custom form.
Thanks in advance,
Robert
For Red:
Totalscore.value.fontcolor = "256,0,0"
Take a look at this article. It includes code for changing colors in a LiveCycle document, and a little explaination.
http://www.acrobatusers.com/tutorials/2007/js_disabling_fields/
If your changing colors based on a field value, then this code should be included in the calculation script for the field that's being colored.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script