Skip to main content
Participant
November 29, 2020
Question

How to remove "Warning: Javascript Window" with another title

  • November 29, 2020
  • 3 replies
  • 10483 views

Hi guys, I have tried these examples (Example 1 , Example 2 ) and create a trusted function in folder level script to surpass the default warning message in the app.alert() with another alert title. However, the trusted function seems like not working in the distributed version of my pdf form. As i know, this will only work if the trusted function has been installed on the user's system but will error out when not installed. How can I solve this problem? 

This topic has been closed for replies.

3 replies

Bernd Alheit
Community Expert
Community Expert
November 29, 2020

You can check the existence of the function.

Wong5CF2Author
Participant
November 29, 2020

can u explain more?

Bernd Alheit
Community Expert
Community Expert
November 29, 2020

When the trusted function doesn't exists use the app.alert()

Legend
November 29, 2020

You can't, by design. This is a crucial security feature.

Wong5CF2Author
Participant
November 29, 2020

Any documentation on this security feature?

try67
Community Expert
Community Expert
November 29, 2020

Yes, it's documented in the JavaScript for Acrobat API Reference document (although the way it's worded is somewhat outdated). For example:

 

try67
Community Expert
Community Expert
November 29, 2020

What is the problem, exactly?

Wong5CF2Author
Participant
November 29, 2020

I don't want the default alert message title ("Warning: Javascript Window"), it is misleading for consumer when filling the form.

try67
Community Expert
Community Expert
November 29, 2020

But you know the answer already... In order to do that you have to run the script from a privileged context, such as a trusted function that's installed on the local machine.