In LiveCycle Designer ES, you can script against certain JavaScript objects in Acrobat by using the Acrobat scripting syntax. As a result, you can use the properties and methods of those objects on your form. For example, to display a message in the JavaScript Console from Acrobat, you can add the following script to the event of a form design object in LiveCycle Designer ES:
console.println(“This message appears in the JavaScript Console.”);
var myDoc = event.target;
myDoc.mailDoc(true);
Note:
In LiveCycle Designer ES, you must ensure that the scripting language for the event is set to JavaScript so that the script will execute correctly at run time.
You can also use references to the JavaScript objects in Acrobat in your reference syntax. For example, the following script gets the signed state of a signature field and takes an action based on the state:
// Proceed if the current field is not signed.
var oState =
event.target.getField(“form1[0].#subform[0].SignatureField1[0]“)
.signatureValidate(); //Get the field’s signed state.
}
When working with JavaScript from Acrobat in LiveCycle Designer ES, remember these points:
In LiveCycle Designer ES, use event.target to access the Doc JavaScript object from Acrobat. In Acrobat, the this object is used to reference the Doc object; however, in LiveCycle Designer ES, the this object refers to the form design object to which the script is attached.
For more information about converting Acrobat scripting to LiveCycle Designer ES, see the article Converting Acrobat JavaScript for Use in LiveCycle Designer ES Forms in the LiveCycle ES Developer Center at http://www.adobe.com/go/learn_lc_AcrobatDeveloper.
See also 

Using JavaScript objects from Acrobat in LiveCycle Designer ES