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

app.alert & app.response dialog boxes (Javascript Warning messages)

tesschri
Registered: Jan 29 2007
Posts: 4

When Acrobat 8 Pro displays my app.alert or app.response boxes, there is a Javascript Warning message that is added in the title bar. With app.response, there is also a Warning message added at the bottom of the window.

When I test my app.alert & app.response methods in the Console, my titles and boxes are correct. When the methods are called on a button click event, or on a open page event, the warning messages are added by Acrobat.

Is there a mean to avoid these warning message ?

Thanks for your help.

I use Acrobat to create different kind of PDF and electronic forms

My Product Information:
Acrobat Pro 8.1.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes and No. Adobe beefed up the security in Acrobat 8 to the point of making a lot of JavaScript useless (http://www.acrobatusers.com/blogs/thomp/?p=10).

The Warning Message is displayed if any of the user interface functions are used outside a privileged context. The Console Window is Priliveged so the alert doesn't show a warning. A document is not usually privileged, so code in a PDF does show a warning.

You can make a document privileged by certifying it. This means encrypting the PDF with a digital signature. If a user has the certifying signature on thier system, then any JavaScript in the document executes with privilege. The signature tells Acrobat that the user trusts the document. However, signatures are easily invalidated. For example, changing the border color on a form field with invalidate certification, so it's not a very good technique.

My suggestion is to live with the warnings.

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