
Using Help
|
Contents
|
Index
Back
182
Adobe Acrobat Help
Adding Interactivity
Using Help
|
Contents
|
Index
Back
182
and selecting JavaScript from the list on the left. Select Enable Acrobat JavaScript if it is
not already selected, and click OK.
To choose the JavaScript action:
1
Create or select a form field, link, bookmark, or page action.
2
Press the right mouse button (Windows) or Control-click (Mac OS), and choose
Properties.
3
Select JavaScript as the action. For information about selecting an action for a form
field, link, bookmark, or page action, see
“About action types” on page 180
.
4
Click Edit.
5
Copy and paste a predefined custom script, or type the script in the text box provided,
and then click OK.
6
Click Set Action or Set Link, as appropriate.
To create a document level JavaScript:
1
Choose Tools > JavaScript > Document JavaScripts.
2
Type the name of the script in the text box.
3
Click Add.
4
Copy and paste a predefined custom script, or type the script in the text box provided,
and then click OK. The name of the script appears in the lower text box.
5
Click Close.
6
Choose Tools > JavaScript > Console to open the console window. When a JavaScript is
executed, you are alerted to any script errors by a message in the console window. Click
Clear to clear the results, or Close to close the window.
To edit or delete an existing document level JavaScript:
1
Choose Tools > JavaScript > Document JavaScripts.
2
To edit a document level JavaScript, select the JavaScript from the list, and click Edit.
Change the existing text, or paste a predefined custom script into the text box provided.
Click OK to accept and conclude the editing.
3
To delete a document level JavaScript, select the JavaScript from the lower text box,
and click Delete.
4
Click Close.
To create a plug-in level JavaScript:
1
Create a text file containing the JavaScript function. Name and save the file with a .js
extension.
2
Copy the text file into the JavaScripts directory inside the Acrobat folder, or into the
JavaScript folder in your system directory.