Remove warning:JavaScript window message from dialog

I have created dialog box and placed in folder label script.

var dialogTrust = app.trustedFunction(function(data)
{
app.beginPriv();
 var d = dialog(data);
 d.execDialog();
 
app.endPriv();
});

Unfortunately I am getting warning:JavaScript window.

Is there anyway to remove this message?


Jack Smith


5 Answers

Voted Best Answer

Like this:

var dialogTrust = app.trustedFunction(function()
{
app.beginPriv();
var data = { 
description: { name: "Test Dialog", elements: [
{ name: "Hello World", type: "static_text", },
{ type: "ok", },
] } }; 
app.execDialog(data);

app.endPriv();
});


By David Dagley   

If you put script for the dialog inside the trusted function it will get rid of the message.


David Dagley   

David, can you elaborate?


JR Boulay   

Great! Thank you.


JR Boulay   

The script will either need to be placed in one of Acrobat's/Reader's JavaScripts folder or the document will need to be certified.

Using Trusted Functions by Thom Parker


George Kaiser   


Please specify a reason: