Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Nov 29, 2020 Nov 29, 2020

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? 

TOPICS
General troubleshooting , How to , PDF forms
10.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2020 Nov 29, 2020

What is the problem, exactly?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2020 Nov 29, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2020 Nov 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 29, 2020 Nov 29, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2020 Nov 29, 2020

Any documentation on this security feature?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2020 Nov 29, 2020
LATEST

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

 

Snap3.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 29, 2020 Nov 29, 2020

It's a standard JavaScript feature, not just in Acrobat. It's considered vital since web pages and PDFs are uncontrolled downloads, and they COULD come from a bad source. All PDFs and web pages are therefore penalised because it's the only way to penalise the bad ones.

 

It is about impersonation/phishing. It makes it impossible to produce a message which looks exactly like a legitimate system message. For example, a box which looks exactly like a Facebook login; many people would fall for it and the PDF/web page now has their password. Instead of getting rid of this, I'd suggest focussing on treating it as part of mandatory security training for your users. They should be recognising and celebrating it, not wanting it to go away...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2020 Nov 29, 2020

You can check the existence of the function.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2020 Nov 29, 2020

can u explain more?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2020 Nov 29, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines