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.
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