call

Calls a JavaScript function through the web component.

Syntax

ui.Interface.frontCall("webcomponent", "call",
  [aui-name, function-name, [ param1, param2, ... ] ],
  [result]
)
  1. aui-name - This is the name of the web component name in the AUI tree.
  2. function-name - This is the name of the web component JavaScript function to be called.
  3. param1, param2, ... - Optional parameters to be passed to the web component JavaScript function.
  4. result - Holds the JavaScript function return value.

Usage

Calls a JavaScript function through the web component. The JavaScript function must be implemented in the HTML content pointed by the URL-based web component, or in the user-defined JavaScript of a gICAPI-based web component.

The aui-name and function-name arguments are mandatory.

The arguments following the function-name argument will be passed to the JavaScript function.

That the result variable will contain the value returned by the JavaScript function.

Example

DEFINE result STRING
CALL ui.Interface.frontCall("webcomponent","call",
        ["formonly.data","echoString","abcdef"],[result])
For a complete example, see Example 2: Calling a JavaScript function of a gICAPI web component.