Attributes

The SCRIPT element has the following attributes:

Table 1. Attributes of the SCRIPT Element

Attribute Name

Required

Default

Description

EVENT

Yes

 

The JavaScript name of the event as defined in the W3C HTML recommendations.

JavaScript events are valid within the PAGE, FIELD or ACTION_CONTROL elements, with the exception of FIELD elements within a LIST or read-only FIELD elements.

Note that the ONCLICK event will be ignored for ACTION_CONTROL with a TYPE of CLIPBOARD (for further information see ACTION CONTROL.).

In addition, please note that by default when a link is clicked in the Cúram application the link is processed by Cúram specific code. If you are adding some scripting to a link and do not want this default processing to occur, the event should be stopped using the JavaScript APIs available.

ACTION

Yes

 

The JavaScript to be invoked if the event occurs. This must be a function call including parameters, if any. For example; someFunction() or someFunction(someParam) where someParam may be a global variable defined in script file.

SCRIPT_FILE

No

 

The name of the script file containing the JavaScript functions that are specified in the ACTION attribute of the SCRIPT element. If no SCRIPT_FILE attribute is set on a particular SCRIPT element within a FIELD or ACTION_CONTROL the PAGE script file is used by default. The script file should be added in a component. If another script file has the same name in another component, the version in the highest priority component will be used. If not specified, the SCRIPT will expect to find the functions in the page-level script file specified with the PAGE element's SCRIPT_FILE attribute.