0 Replies Latest reply on May 23, 2017 4:16 PM by DavetheBari

    Access to Document level JavaScript in Reader for Mobile?

    DavetheBari Level 1

      Although the API for Acrobat Reader for Mobiles lists a few properties and functions for Document level JavaScript, there seems to be no way of actually using these.

      1. As far as I can detect, the Reader produces no events other than for field actions, and the JavaScript object 'this' in a field event is the field object.

      2. The field object's property 'Doc' that exists in Reader for Windows is apparently not accessible in Reader for Mobiles, and I have found no way, devious or otherwise, of making Document Level JavaScript code in a form being viewed in Reader for Mobile visible in a field Action.

           Where 'fTestFunction()' is a function defined in the form's document level script:-

           a. Code in a field action script

                     this.fTestFunction();

                produces an exception because 'this' refers to the field object that produced the event, and the field object has no definition of 'fTestFunction()'.

           b. the field object can be obtained through the event object, but the following code in a MouseUp Action script:-

                    event.target.doc.fFieldFunction();

                produces an exception because in Reader for mobiles, the field object (referenced by event.target) does not have the object 'doc' available.

           c. For the same reason as in b. above,

                     this.doc.fTestFunction();

                also fails.

      Does anyone know of a way to access Document Level script in filed Action script, in Reader for Mobiles?       .