Adobe 12001196 Scripting Guide - Page 22

Close, Key Notes, Acrobat JavaScript Editor and Debugger Console

Page 22 highlights

2 Acrobat JavaScript Editor and Debugger Console Using a JavaScript Editor 5. Click Add to open the JavaScript editor. 6. In the editor window, write the JavaScript script that you want to run when the user opens the page. 7. When you are done, click Close to close the editor. If there are errors in your code, the JavaScript editor will highlight the code line in question and display an error message, as shown in Figure 2.2. FIGURE 2.2 Error detected by the JavaScript editor In Figure 2.2, the quotation mark to the right of the string is missing. Key Notes You can open the JavaScript editor to associate a JavaScript action with an object at various locations (or "levels") in a PDF document. For example, you can associate a script at the location of a particular field in a form or at the document level, in which case the script is available from all other scriptable locations within the document. Access to the editor depends on where you want the script to take effect. For details on accessing and using the JavaScript editor at different locations within a PDF document and at the application level, see the ASN JavaScript training module on "Location Matters." 22 Acrobat JavaScript Scripting Guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90

Acrobat JavaScript Editor and Debugger Console
Using a JavaScript Editor
2
22
Acrobat JavaScript Scripting Guide
5.
Click
Add
to open the JavaScript editor.
6.
In the editor window, write the JavaScript script that you want to run when the user
opens the page.
7.
When you are done, click
Close
to close the editor.
If there are errors in your code, the JavaScript editor will highlight the code line in
question and display an error message, as shown in
Figure 2.2
.
F
IGURE
2.2
Error detected by the JavaScript editor
In
Figure 2.2
, the quotation mark to the right of the string is missing.
For details on accessing and using the JavaScript editor at different locations within a PDF
document and at the application level, see the ASN JavaScript training module on
“Location Matters.”
Key Notes
You can open the JavaScript editor to associate a JavaScript action with an object at
various locations (or “levels”) in a PDF document. For example, you can associate a script
at the location of a particular field in a form or at the document level, in which case the
script is available from all other scriptable locations within the document. Access to the
editor depends on where you want the script to take effect.