The JavaScript language was developed by Netscape Communications as a means to create interactive web pages more easily. Adobe has enhanced JavaScript so that you can easily integrate this level of interactivity into your PDF documents.
You can invoke JavaScript code using actions associated with bookmarks, links, and pages. The Set Document Actions command lets you create document-level JavaScript actions that apply to the entire document. For example, selecting Document Did Save runs the JavaScript after a document is saved.
You can also use JavaScript with PDF forms and batch sequences. The most common uses for JavaScript in forms are formatting data, calculating data, validating data, and assigning an action. Field-level scripts are associated with a specific form field or fields, such as a button.This type of script is executed when an event occurs, such as a Mouse Up action.
To learn how to create JavaScript scripts, download the JavaScript manuals from the Adobe website. The Acrobat JavaScript Scripting Guide contains background information and tutorials, and the Acrobat JavaScript Scripting Reference contains detailed reference information. These and other JavaScript resources are located on the Adobe website.