4D v14.3WA EXECUTE JAVASCRIPT FUNCTION |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
WA EXECUTE JAVASCRIPT FUNCTION
|
WA EXECUTE JAVASCRIPT FUNCTION ( {* ;} object ; jsFunction ; result|* {; param}{; param2 ; ... ; paramN} ) | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
If specified, object is an object name (string) If omitted, object is a variable | |||||
object | Form object |
![]() |
Object name (if * is specified) or Variable (if * is omitted) | |||||
jsFunction | String |
![]() |
Name of JavaScript function to execute | |||||
result|* | Variable |
![]() |
* for a function with no result or | |||||
![]() |
Function result (if expected) | |||||||
param | String, Number, Date, Object |
![]() |
Parameter(s) to pass to function | |||||
The WA EXECUTE JAVASCRIPT FUNCTION command executes, in the Web area designated by the * and object parameters, the JavaScript function jsFunction and optionally returns its result in the result parameter.
If the function does not return a result, pass * in the result parameter.
You can pass one or more parameters containing the parameters of the function in param.
The command supports several types of parameters for both input (param) and output (result). You can pass and retrieve data of the number, date, object and string types.
Important: Handling complex type results (objects, dates, etc.) is only possible if the Web area uses the integrated Web Kit as the rendering engine.
Calling a JavaScript function with 3 parameters:
$JavaScriptFunction:="TheFunctionToBeExecuted"
$Param1:="10"
$Param2:="true"
$Param3:="1,000.2" `note "," as thousands separator and "." as the decimal separator
WA EXECUTE JAVASCRIPT FUNCTION(MyWArea;$JavaScriptFunction;$Result;$Param1;$Param2;$Param3)
Product: 4D
Theme: Web Area
Number:
1043
Created: 4D v11 SQL Release 2
Modified: 4D v14
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)
Inherited from : WA EXECUTE JAVASCRIPT FUNCTION ( 4D v11 SQL Release 6)