Skip navigation
roc524
Currently Being Moderated

JavaScript in Form Acts Differently in Acrobat X and Reader X

Jun 1, 2011 8:38 AM

I have a fillable PDF form whose Submit button calls this JavaScript:

this.mailForm(true);

 

When I open this form in Acrobat X Pro and hit the submit button, a mail dialog box comes up as I would expect.

 

When I open this form in Acrobat Reader X and hit the submit button, I get the error:

Not allowed error.  Security settings prevent access to this property or method.

 

Why the difference?  Note that I will have this form on my website, so I cannot expect my visitors to change their Reader setting.  How can I fix it?

 
Replies
  • Currently Being Moderated
    Jun 1, 2011 9:26 AM   in reply to roc524
    Why the difference?

    Look at the documentation of the method mailForm in the Acrobat Javascript Reference.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2011 10:17 AM   in reply to roc524

    The encircled "F" under the function's name means that it has security restrictions, specifically:

    F - Requires forms rights (p. 35 of the reference file)

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2011 12:24 PM   in reply to roc524

    The privileged context is not related to the fact that for this method to

    work in Reader the file must have Form Rights enabled.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 2, 2011 11:35 AM   in reply to roc524

    The error message is simply misleading, and I don't know why it has been made so. It has nothing to do with security settings; it is simply that the form does not have the according rights.

     

    The "security" error message does, of course make one believe that it is a question of privilege… whidh is misleading.

     

    HTH

     

    Max Wyss.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 3, 2011 7:00 AM   in reply to roc524
    I then did Save As - Reader Extended PDF - Enable Additional Features.

    This assigns only the document save right. You need the form rights. Read the documentation.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points