Highlighted

TextBox Fill Color - Convert from Acrobat

Avatar

12-08-2008

Hi,



I am trying to change the background fill in a TextBox when a corresponding CheckBox is "checked." It used to work in Acrobat... now using LiveCycle Designer and I am having a tough time converting...



--------------------------------------

OLD ACROBAT CODE



var x = this.getField("TextField1");

var y = this.getField("CheckBox1");

x.fillColor = color.white;



if(y.isBoxChecked(0))

x.fillColor = color.white;

else

x.fillColor = color.ltGray;



--------------------------------------



"NEW" LIVECYCLE CODE



var myDoc = event.target;

var x = myDoc.getField("topmostSubform[0].Page1[0].TextBox1[0]");

var y = myDoc.getField("topmostSubform[0].Page1[0].CheckBox1[0]");



x.fillColor = "255, 255, 255";



if(y.rawValue == 1)

x.fillColor = "255, 255, 255";

else

x.fillColor = "168, 168, 168";



--------------------------------------



Any help or direction would be appreciated...



Fred F.