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

Need help eliminating "Warning: JavaScript Window" text in message

charlie6067
Registered: Nov 22 2006
Posts: 37

I've recently upgraded from Acrobat 5 to 8 Pro. Acrobat 8 introduces trustedFunctions and privileged content which is causing a warning message for all the message boxes in the PDF. I've also looked through the JS for API Acrobat API Reference and others but can not find a real example for the app.alert function. Here's the code that's causing the trouble. Would someone please show where to add the trustedFunction calls and the app.beginPriv() and app.endPriv()? I can then apply it on the other calls. This PDF is going out to external customers and that warning message shouldn't ever be seen by a client.

Thanks in advance,
Charlie
charlie6067
---------------------------------------------------------------------------------------------
//
//Page2:Page Open:Action2
//
/******* belongs to: Page-Actions:Page2:Page Open:Action2 *******/

// Displays a message box when PDF opens.

if (x != 1) {
app.alert("Text for this message box will be supplied by the Business. ", 3);
var x = 1;
}

//
//

charlie6067
Registered: Nov 22 2006
Posts: 37
I just checked with someone at Adobe and found that the only way to eliminate the warning is to [b]certify[/b] a PDF. This requires signing the PDF with digital certificate and then have the recipient verify the certificate. For my project, that won't work but want to pass on the information to others in this forum.

Thanks,
Charlie
charlie6067
Formfingers
Registered: Feb 7 2007
Posts: 90
Thanks Charlie for posting this!! Was looking for the same answer and glad you had your reply to provide. Saved me lots of time and headaches....
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
It has also been previously posted that one can create a "trustedFunciton" and use the "beginPriv" and "endPriv" methods and this code needs to be run at application initialization, as a batch process, or through the JavaScript console. As well as certifying the document.

George Kaiser