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

Need help with a javascript code

Tech264
Registered: Apr 4 2008
Posts: 111

The code below is from a check box that's placed on my form and it works fine. However, what I'd like to do next with this code is that when the page becomes visible I want to populate a text field with information based on that check box. Also if possible I would like to add a highlighted yellow text field on the page that becomes visible that displays another text wording.

form1.Page1.Table4.Row1[1].NewGoal1.NewGoal1::change - (JavaScript, client)

if (NewGoal1.rawValue == 1)
{Goal1.presence = "visible"
}
else
{Goal1.presence = "hidden"
}

This is the check box on page 1
[img]http://www.narcofreedom.com/forms/Goal1.jpg[/img]

once clicked the other page becomes visible and the text field displays the #1 where it says Goal#.

[img]http://www.narcofreedom.com/forms/Goal2.jpg[/img]

My Product Information:
LiveCycle Designer, Windows
PetafromOz
Registered: Jun 8 2009
Posts: 230
Hi Tech264,

Not sure how to answer the first question:
When you say you want to populate a text field with the info based on that check box - do you mean the caption text or some associated value that you have set up somewhere?

But I can definitely help you with the field colour change:
To highlight a text field the colour of your choice (in this case I've chosen a sort of lemony colour, but you'd obviously pick whatever colour range you want):

[textfieldname].fillColor = "255,255,210";

Hope some of that helps, Peta

from way... underground at Parkes - central West NSW - Australia

xrum
Registered: Feb 25 2009
Posts: 124
mytext.rawValue = myCheckbox.label