Acrobat XI Pro: How do I "Edit all Javascripts"?

New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Using Acrobat XI Pro, I can't figure out how to open the window that contains ALL the Javascripts in the document.  I need to add a single line of code to all required fields, and it would be 10x easier if I could go through all the scripts in the document at once, instead of clicking Properties > Actions > Edit for each field.  In Acrobat X Pro, in EDIT mode, I would click Other Tasks > Javascripts > Edit all Javascripts to accomplish the same task, but I'm using Acrobat XI Pro at work, and the menus are very different.

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

Select "Edit all JavaScripts" on the JavaScript pane on the right side "Tools" panel.  If the JavaScript Pane is not visible, then select it from the dropdown menu on the top right of the Tools panel. 

TOPICS
Acrobat SDK and JavaScript, Windows

Views

157

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Acrobat XI Pro: How do I "Edit all Javascripts"?

New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Using Acrobat XI Pro, I can't figure out how to open the window that contains ALL the Javascripts in the document.  I need to add a single line of code to all required fields, and it would be 10x easier if I could go through all the scripts in the document at once, instead of clicking Properties > Actions > Edit for each field.  In Acrobat X Pro, in EDIT mode, I would click Other Tasks > Javascripts > Edit all Javascripts to accomplish the same task, but I'm using Acrobat XI Pro at work, and the menus are very different.

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

Select "Edit all JavaScripts" on the JavaScript pane on the right side "Tools" panel.  If the JavaScript Pane is not visible, then select it from the dropdown menu on the top right of the Tools panel. 

TOPICS
Acrobat SDK and JavaScript, Windows

Views

158

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 20, 2018 0
Adobe Community Professional ,
Dec 20, 2018

Copy link to clipboard

Copied

Select "Edit all JavaScripts" on the JavaScript pane on the right side "Tools" panel.  If the JavaScript Pane is not visible, then select it from the dropdown menu on the top right of the Tools panel. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 1
New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Thank you, Thom.  That's been bugging the crap out of me.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 0
Most Valuable Participant ,
Dec 21, 2018

Copy link to clipboard

Copied

You should not edit the code through that window! It can cause serious damage to your file.

I recommend you only use it to locate the code you want to edit and then go to the actual location of that code and edit it there.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 21, 2018 0
Adobe Community Professional ,
Dec 21, 2018

Copy link to clipboard

Copied

Or, here a couple strategies for handling multiple code changes that reduce both time/effort to maintain code and the human error associated with making the same change over and over again.

1.  If the code is short segments used in a field script, then use "field.setAction" the Console to set the script everywhere it is needed. You aught to be able to do this in a single loop, cause  in such cases(where the same script is needed in many fields) your field names should follow a regular pattern.

2. If the code is long, but only slightly different in every place it is used, then create a document level function to encapsulate the code, replacing the differences with variables. Then call this function from all the places where it is needed using strategy #1.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 21, 2018 0