LiveCycle Designer ES includes extensive scripting capabilities, including support for the most common JavaScript objects from Acrobat. When you convert an Acrobat form to LiveCycle Designer ES, most JavaScript scripts continue to work without requiring changes. However, you will need to manually convert some JavaScript scripts from Acrobat to maintain the behavior of your Acrobat form.
When converting scripts on your Acrobat form, note that LiveCycle Designer ES scripting differs from scripting in Acrobat in several ways:
LiveCycle Designer ES workspace
In the LiveCycle Designer ES workspace, you can change object properties and behaviors on your form without requiring you to create scripts.
LiveCycle Designer ES includes support for JavaScript as well as for FormCalc, which is a simple calculation language. FormCalc includes built-in functions that perform many useful operations that would otherwise require extensive scripting.
LiveCycle Designer ES forms are highly structured; therefore, to reference specific objects, properties, or methods, you must include the appropriate reference syntax in your script. You can use the statement completion options in the Script Editor to assist you in creating reference syntaxes.
It is possible to continue to use JavaScript objects, properties, and methods from Acrobat in LiveCycle Designer ES. However, you should consider JavaScript from Acrobat only for tasks that you cannot perform using the XML Form Object Model in LiveCycle Designer ES. For example, you can use JavaScript from Acrobat to add attachments, bookmarks, and annotations; search or spell check the form; create reports; or access and manipulate metadata. You cannot use JavaScript from Acrobat to perform actions such as setting field values, adding new fields to a form, or deleting pages from a form.
Note:
You cannot use Acrobat to add JavaScript scripts to a LiveCycle Designer ES form, including Acrobat forms that you have converted using LiveCycle Designer ES. When you view a LiveCycle Designer ES form in Acrobat, all JavaScript tools are unavailable.
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 

About moving from scripting in Acrobat to LiveCycle Designer ES