ogscript
Defines an ogScript code snippet to handle an event on a UI element or parameter.
For more information, see ogScript Reference on page 141.
Syntax
<ogscript handles=”[event type]”>
Ogscript code
</ogscript>
Attributes
Attribute |
Values |
Restrictions |
Description |
use |
online |
|
Script will only run on a real device |
offline |
Script will only run on a file-based device |
||
both |
Script will run always |
||
targetid |
string |
|
The ID of the UI element to target. |
handles |
|
Multiple “handles” arguments can be supplied separated by commas.
|
The type of event that triggers the script.
|
onchange |
Only supported by tabs and parameters. |
Triggers script when parameter or tab is changed. |
|
onmousedown |
|
Triggers script onmouse click down event. |
|
onmouseup |
|
Triggers script on mouse click up event. |
|
onclick |
|
Triggers script when element is clicked. |
|
onmousemove |
|
Triggers script when mouse moves over component |
|
ondrag |
|
Triggers script hen the element is dragged |
|
ondrop |
|
Triggers script when another component is dropped on the component. |
|
dragvalue |
|
must specify something to return (generally a string or a number) when the element is dragged. |
|
onload |
|
Triggered when the panel has finished loading or is reloaded |
|
oid |
Positive integer |
Must be a defined OID.
Only applies to “onchange” |
The OID of the parameter to target. |
element |
List of array indices separated by commas |
All array elements referenced must exist in the parameter value.
Only applies to “onchange” |
By default all elements of an array parameter are targeted. This attribute can be used to return a subset of the array. If a list is provided, only the elements at the provided indices are returned (note- you can specify the elements in any order).
This value must be “0” for a non-array parameter. |
script |
ogScript |
Can also be the text content of the <ogscript> tag. |
The script to run when triggered by any of the events listed in “handles”. |