PDF Javascript not working anymore
Copy link to clipboard
Copied
Hello,
I recently wrote a huge 350 line code for a button that will email the form I created to another person in our office. I completed the form on Friday, ensured that all codes, alert boxes, and form fields are working and valid before leaving the office at 4 pm EST. I came into work this morning and opened my completed form to check everything, only to find out that my button is no longer working, and the code will not run. I have made no changes, nor even entered the form, since I left the office on Friday so there could not have been anything done to it so I know that the codes are not tampered with in any way.
Has anyone experienced something similar? Please let me know as I need these codes to work, this form is a necessity in the office!
Copy link to clipboard
Copied
Did you check the console window to see if any errors are reported?
There are a number of reasons why code would work during the development session, but fail after Acrobat was closed and restarted. For example, if variables or functions were defined that remained in memory, but were removed from the code. So everything worked during that session, but after closing and reopening Acrobat, any code that depended on those missing things failed.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Hi,
The only thing that comes to my mind based on your description of the issue is if, for example, an unattended update took place overnight; sometimes, after an update is applied, it is possible that the software might've reverted to undesired old default settings.
To be sure if this is happening in only one computer, can you test the same file in another computer with different OS version and Acrobat version?
And do the same in another computer with the same software and hardware requirements as the computer where you created this file.
But in any case, maybe a hard reboot can do the trick, or save the original file, and repair Acrobat (if you're on Microsoft Windows) and see if this improves anything.
NOTE: Another scenario that I've read in these forumsbefore is the users that try to run a full PDF with Acrobat JavaScript code through their preferred web browsers.
For instance, in the case of Apple Preview browser (if on iOS or MacOS), users have reported that their PDFdoesn't work as intended afterwards.
Would you mind sharing a little more in which operating system and version of Adobe Acrobat is this happening?

