Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Eliminate the: Warning Jacascript window line

Avatar

Level 7

Is it possible to eliminate the: Warning Jacascript window line on the top of a message box window?

Here is the script I am using

 

xfa.host.messageBox("text."

,"FORM",3);

Thank you

4 Replies

Avatar

Level 6

The only way is to execute it from a trusted context, such as a correctly constructed folder-level JavaScript. If the code has to be in the document, the document would have to be certified and user would have to decide to trust it to execute privileged scripts.

Avatar

Level 5

Hi,

George is right. You have to use a folder-level Javascript.

You create an .js File in (our account: C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts) of Acrobat or Reader. The name of the file is unimportant/equal. This file should be contained for example the follwoing code:

myTrustedSaveAs = app.trustedFunction(function(doc,path)

{

app.beginPriv();

doc.saveAs(path);

app.endPriv();

});

OR (this code is from radzmar in a german forum)

var MyDialog = app.trustedFunction(function(doc, Msg, Icon, Type, Title)

     {

     app.beginPriv();

          app.alert({ cMsg: Msg, nIcon: Icon, nType: Type, cTitle: Title});

     app.endPriv();

     });

And then you can use this in the form:

var Msg = "Hello, \r\rthis is the information text for the user.";

var Icon = "3";

var Type = "0";

var Title = "Information for User";

event.target.MyDialog(event.target, Msg, Icon, Type, Title);

The second way is the following ( also from a german forum formatix)

  1. You have to save the pdf-form as an certified document.
  2. The person which use this form have the related open key (CertExchange.fdf)) .
  3. This key have to be in the list of confidential identity.
  4. Then the warning also don't appear.

I hope it's helpful?

Kind regards Mandy

Avatar

Level 5

It works?

Then I believe you have to mark this discussion as answered?

Kind regards Mandy