Skip to main content
May 19, 2021
Answered

Adobe Reader Javascript Security Error

  • May 19, 2021
  • 1 reply
  • 2447 views

Good afternoon everyone, 

 

I am fairly new to Adobe, therefore I apologize for a potentially silly question. 

 

I created a form in which I used the following JavaScript to essentially add/remove additional pages based on whether one of the various check boxs are selected or not:

 

if(event.target.value!="Off")
{this.getTemplate("t1" ).hidden=false;}
else
{this.getTemplate("t1" ).hidden=true;}

 

My form works perfectfully fine when utilizing Adobe Acrobat Pro 2017; however, when opened in Adobe Reader (where the individuals receiving this form will be opening it) the form does not respond to the JavaScript function. I receieve the following error:

 

"NotAllowedError: Security settings prevent access to this property or method.
Template.hidden:2:Field Risk 1:Mouse Up".

 

I have done some reading some the error, but the error seems to be somewhat universal and could be a result of many different issues. 

 

Any thoughts on how to avoid this issue?

 

Many thanks!

This topic has been closed for replies.
Correct answer Bernd Alheit

Acrobat Reader can't hide or show template pages. Acrobat Reader can spawn and delete template pages. 

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
May 19, 2021

Acrobat Reader can't hide or show template pages. Acrobat Reader can spawn and delete template pages. 

May 19, 2021

Thank you, Bernd Alheit. 

 

Do you happen to know the JavaScript code that would enable me to make these changes?

Bernd Alheit
Community Expert
Community Expert
May 19, 2021

Look at the documentation in the Acrobat Javascript Reference.