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

Use of Button/Check box to "hide" pages....

tlt213
Registered: Mar 9 2008
Posts: 7

I have this Script that I copied from this forum to Hide pages using a button...

I keep getting Page2 is undefined....

Page2.presence = (this.rawValue == "1") ? "visible" : "hidden";

How can I fix this and also how can I adapt this to work on a strig of pages... not necessarily in numerical order.

Thanks..

Tim

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This script is for a LiveCycle Form. So the first question is, do you have a LiveCycle form? If you do then you'll need to learn a bit about LiveCycle form structure. All Pages, subforms, and fields are accessed through the SOM Path. Open the Hierarchy window and you'll see the Form Hierarchy. The SOM path for accessing any node in the hierarchy parallels this structure. The SOM Path for any node is also shown in the scripting window for scripts on that node.

Page2 is the name of a subform that represents a page. For this to work on your form you would need a subform named "Page2" that is accessible from the element that executes this script. Hiding and showing pages like this also requires that the form is saved as "Dynamic"

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