JavaScript

{dialog.object}getChildObject Method

Syntax

{dialog.object}.getChildObject(alias [, componentType]);

Arguments

aliasstring

The alias of the child component. You must explicitly set the alias of the component to use this function.

componentTypestring

Default = 'ux'

The type of the component. Can be one of the following options:

Component Type
Meaning
'ux'

The child component is a UX Component. This is the default value.

'grid'

The child component is a Grid component.

'custom'

The child component is a Custom component. See About Custom Components to learn more about Custom components.

Returns

resultobjectboolean

Returns a pointer to the JavaScript object for the child component if the requested component exists. Otherwise, returns false.

Description

Returns a pointer to the child component.

Discussion

Gets a pointer to a component that has been opened as a child of the current UX component (for example, a component opened in a window or DIV), or embedded into the current us (using the Embedded Object control.) Once you have a pointer to the child object, you can execute methods on the child component.

Example

//Get a pointer to the child UX component with alias of 'MYCHILD'.
var childObj = {dialog.object}.getChildObject('MYCHILD');

if (childObj) {
    // object exists
}

If the JavaScript object doesn't exist for the requested component, getChildObject() will return false. You should always check the returned value of the getChildObject() method before using the object. This can be done by wrapping your code in an if block as shown in the example.

See Also