3 Replies Latest reply on Jan 13, 2015 5:20 AM by syswizardx

    GetJSObject() - another wierd one

    syswizardx Level 1

      I was able to successfully use getField and then set a form field's value and then from ReadOnly=False to True.

      However, when I attempted to reverse this, the field stayed ReadOnly=True, but the Value persisted after I saved the PDF file  !!


      In other words, you could not "see" the value in the form, but when you did a getField using the JSObject, the value was "there"....like a phantom value.


      Super wierd...and buggy.

        • 1. Re: GetJSObject() - another wierd one
          Bernd Alheit Adobe Community Professional & MVP

          Did you perform this with the JavaScript Debugger?

          • 2. Re: GetJSObject() - another wierd one
            syswizardx Level 1

            Nope - it's under the VBA debugger using the Javascript bridge.

            The debugger "shows" the value of the form field, but after I save the PDF file, Acrobat Reader (or Pro) shows nothing in that field.

            However, upon re-running my routine, a call to getField("xyz") does produce the value that was set in the previous run.

            So the value is "in there", but does not show visibly. Also strange, I set the ReadOnly property to False, but it remains ReadOnly.

            • 3. Re: GetJSObject() - another wierd one
              syswizardx Level 1

              Upon further review, what appears to be happening is that another field has a MouseUp event handler coded to set the form field in question to a null string.

              The handler appears to be firing before the form is closed programatically even though there is no user interaction !!!


              Yep, and now I found it: there was an initialization script at the document level...that was resetting the fields in question programatically.

              Now I'm in big trouble: how to disable that ? What I need is a special Open method that acts like a MS Office document opened in "Safe Mode".