After you add scripts to a script object, you can reference the script object from any event that supports JavaScript scripts.
2. Create a reference to the script object and any functions within the script object. The following generic syntax assumes that the object where you are referencing the script object is at the same level as the script object in the form hierarchy or that the script object exists at the highest level of the form hierarchy.Similar to referencing other objects on a form, you must provide a valid syntax when referencing the script object that includes where it exists within the form hierarchy. For more information about referencing objects in scripting, see “Referencing object properties and values”.For example, using the script object example from “To add script to a script object”, place the following JavaScript script on the exit event for a text field. Test the form using the Preview PDF tab.