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

Can't Change Font Color

RAYD7024
Registered: Aug 5 2009
Posts: 13

I am having a problem with the following JavaScript:

form1.#subform[0].Button1::mouseUp - (JavaScript, client)

form1.Button1.fillColor = "0,255,0";
form1.Button1.borderColor = "0,0,255";
form1.button1.fontColor = "255,255,255";

The Button1 fillColor and borderColor change; however, the fontColor does not change. What am I doing wrong?

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Should be:
form1.button1.font.fill.color.value = "255,255,255"

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

RAYD7024
Registered: Aug 5 2009
Posts: 13
Still doesn't work, and now I get the following console message:
form1.button1 has no properties
3:XFA:form1[0]:#subform[0]:Button1[0]:mouseUp
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Ups!

I missed one reference. Sorry for that.

Correct code is
Button1.caption.font.fill.color.value = "255,255,255"

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

RAYD7024
Registered: Aug 5 2009
Posts: 13
That doesn't work either. What I don't understand is why I can change the fillColor but not the fontColor. I think I need to put this away for awhile. Thanks for you suggestions.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
If you mark your button and then open the XML-view, you can follow the structure to the preffered parameter.

Example of a regular button:

[color=blue][/color]Push Me[color=blue][/color]
[color=blue][/color]
[color=blue]<?templateDesigner StyleID apbx2?>Here is a sample form:
https://share.acrobat.com/adc/document.do?docid=8f6df44f-bc4f-4c3b-a272-d78a1e7945cf

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs