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

LiveCycle Designer 7

jsaynavong
Registered: Oct 12 2006
Posts: 12

I am using Adobe LiveCycle Desinger 7 to design a form with the following JavaScript. The "initialize" event seems to work fine (i.e, the three objects are not displayed). However, the "Change" event does NOT seem to work. When I click on the chkNewStaff checkbox, a x appears in the checkbox, but the three specied objects are not displayed. What I would like is that when a user clicks on the chckNewStaff checkbox, the txtWorkstation, chkDesktop and chkLaptop controls are displayed; otherwise, they should not be displayed. What's wrong with my JavaScript code below? Thank you in advance for your prompt reply.

----- form1.#subform[0].chkNewStaff::initialize - (JavaScript, client) -----------------------------

txtWorkstation.presence = "invisible";
chkDesktop.presence = "invisible";
chkLaptop.presence = "invisible";

----- form1.#subform[0].chkNewStaff::change - (JavaScript, client) ---------------------------------

if (this.rawValue ==1) {
txtWorkstation.presence = "visible";
chkDesktop.presence = "visible";
chkLaptop.presence = "visible";
}
else
{
txtWorkstation.presence = "invisible";
chkDesktop.presence = "invisible";
chkLaptop.presence = "invisible";
}

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You're code looks fine, at least as long as the field names are correct.

However, this will only work if you form is saved as Dynamic.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script