execJsFunctionDyn()

The function allows to call a JavaScript function from within the WebView EWO JavaScript code directly from CTRL.

Synopsis

void execJsFunctionDyn(string functionName, dyn_anytype message);

Parameters

Parameter Description
functionName Name of the JavaScript function that should be called.
message Parameter that are sent to the JavaScript function as arguments.

Return value

-

Error

missing/incorrect arguments

Description

The function allows to call a JavaScript function from within the JavaScript Code of the WebView EWO. Using the "message" parameter arguments can be passed to the JavaScript function. Mappings, simple values as well as arrays can be used.

The function behaves identical to the execJsFunction() but only accepts a dyn_anytype instead of a list of separate parameters.

To pass an array as an argument the array must be placed within an array in CTRL, e.g. makeDynAnytype(makeDynString("Arg1","Arg2","Arg3"));

Anmerkung: This function can only be used within a WebViewEWO.

Calling the function "myFunc" with four function parameter

CTRL
dyn_anytype myParams = makeDynAnytype("Arg1", 1, "Arg2", 2);
execJsFunctionDyn("myFunc", myParams));
JavaScript
function myFunc(argStr1, argNumber1, argStr2, argNumber2)
{
  // argStr1 = "Arg1", argNumber1 = 1
  // argStr2 = "Arg2", argNumber2 = 2
}

Assignment

WebView EWO

Availability

UI