Adobe acrobat forms javascript object specification User Manual

Page of 64
Acrobat Forms - JavaScript Object Specification
10
Acrobat Forms JavaScript Object Model
Acrobat Forms defines an object model on top of JavaScript 1.2. These objects are only
defined within the Adobe Acrobat realm and are specific to Acrobat Forms. They basically
mirror the Acrobat Forms components and give the forms developer a way to access these
components programmatically in order to query and change their properties. In addition to
defining forms specific objects, there are additional generic objects that allows the developer
to access the underlying document and perform certain actions on it.
App Object
The App object is a static JavaScript object that defines a number of Acrobat specific functions
plus a variety of utility routines and convenience functions.
App Object Properties
calculate
Type: Boolean
Access: R/W
If this property is set to true, it will allow calculations to be performed. If set to false, this
property prevents all calculations in all documents from happening. Its default value is true.
See also the document
property which supersedes this property in later versions.
formsVersion
Type: Number
Access: R
This property indicates the version number of the forms software running inside the viewer.
Use this method to determine whether objects, properties, or methods in newer versions of the
software are available if you wish to maintain backwards compatibility in your scripts. See
for more details.
Example:
if (typeof app.formsVersion != "undefined" && app.formsVersion >= 4.5) {
// Perform version specific operations here.
}
fullscreen
Type: Boolean
Access: R/W
4.0