You can embed calculations and scripts in a form design to execute calculations, methods, or operations when any of an object's events occur at run time. For example, an event occurs at run time when the user performs the action that the event specifies. You can call any of an object's supported methods and examine or set properties by defining a script.
In Designer ES2, scripts and calculations are designated, by default, to run on the client device. The default processing location is defined in the Preview tab of the Form Properties dialog box (select File > Form Properties). To override the default processing location, you can explicitly specify a different processing location by using the Run At option in the Script Editor when you attach a script or calculation to an object.
When you have Forms ES2, processing can be done on the client, the server, or both. When you specify that a script/calculation is to run on the client and server, the client and server may both attempt to run the script/calculation. Forms ES2 always attempts to process the script/calculation if the client cannot do so. If you designate scripts/calculations to run on the server, Forms ES2 runs the scripts and/or calculations, remerges the results into the form, and returns both to the client.
Client-side scripts and calculations are run on the client device. When creating PDF forms for Acrobat or Adobe Reader, all processing must be done on the client. However, if the client cannot run the script or calculation, Forms ES2 will attempt to process the script or calculation.
To run a client-side script in an HTML form successfully, certain conditions must be met: