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

Change property dinamically of button

Jesus
Registered: Mar 27 2007
Posts: 54

How can I dynamically make a button or a field invisible?
 
This is because I'm saving the document as a jpg image to store it later in a imaging management system but I don't want the buttons to appear.
 
How can i change a property of a field, button, etc usin javascript in the click event of a SaveAs button??

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Please Read this Article

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/show_hide_fields/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/show_hide_fields/[/url]

Place your script into the Documents (WillSave) action.

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/document_actions/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/document_actions/[/url]

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

Jesus
Registered: Mar 27 2007
Posts: 54
Thom:

Thank you very much!!

I read the articles and placed the following code in the Documents (WillSave) action:

this.getField("Button2").display = display.hidden;


But I'm getting the following error:


TypeError: this.getField("Button2") has no properties
1:Doc:Will Save

What am I doing wrong??

Regards,

jesús