Customizer's Guide > Working with XUI (XML-based User Interface) Dialog Boxes > XUI Element Reference > <script> Element
  
<script> Element
The <script> element specifies which script interpreter to use. The content of the element specifies the statements to be executed. The element can have no child elements.
The <script> element has the following attributes:
ev:defaultAction = cancel | perform
Specifies if, after processing of all listeners for the event at the current element, the default action for the event (if any) should be performed or not. If cancel, the default action is cancelled (if the event type can be cancelled). If perform, the default action is performed.
ev:event = CDATA
The event type for which the listener is being registered. The value must be an XML Name. For information on working with events, refer to Specifying Event Listeners.
ev:handler = CDATA
Specifies the URI of an element that defines the action that should be performed if the event reaches the observer. If ev:handler is not supplied, the handler is the element that the event attribute is on.
ev:observer = ID
Identifies the element with which the event listener is to be registered. If ev:observer is not supplied, the observer is the element that the event attribute is on.
ev:phrase = capture | default
Specifies when the listener will be activated by the desired event. If default, the listener is activated during bubbling or target phase. If capture the listener is activated during the capturing phase.
ev:propagate = stop | continue
Specifies whether after processing all listeners at the current node, the event is allowed to continue on its path (either in the capture or the bubble phase). If stop, event propogation stops. If continue, event propagation continues.
ev:target = ID
Identifies the target element of the event (that is, the node that caused the event). If ev:target is supplied, only events that match both the event and target attributes will be processed by the associated event handler.
id = ID
Identifies the control.
type = CDATA
Specifies the script interpreter to use when executing the statements. Use the following strings for specifying interpreters:
Rhino JavaScript — application/x-javascript
Microsoft JScript — application/x-jscript
Microsoft VBScript — application/x-vbscript
usage = direct | indirect
Default is direct. If direct, the observer of the event is the parent element of the script element. If indirect, the handler of the event is another element. That other element is identified by the ev:handler attribute. Its value is the ID of the element that should handle the event.
Default is direct. If direct, the observer of the event is the parent element of the script element. If indirect, the observer of the event is another element. That other event has an ev:handler attribute which points to this script element.
xml:space = FIXED
Default is preserve. When preserve is enabled, spaces and linebreak characters in the element's content are preserved when the XUI file is processed by methods such as Application.createDialogFromFile() and Application.createDialogFromDocument().