Description
Occurs after the EvaluateJavascriptAsync function is executed.
Syntax
EvaluateJavascriptFinished (Boolean isFinish, string result, string errormessage)
Event ID
Arguments
Argument |
Description |
---|---|
isFinish |
Evaluates whether all JavaScript codes are executed. The values are:
|
result |
The result of script execution. The execution result is represented in JSON format. The supported JavaScript data types are bool, int, double, string, date, array. When the above types are mapped to the PowerBuilder data types, they are boolean, integer, double, string, datetime, array. If there is no result, "null" will be displayed. |
errormessage |
The error information if an error occurs during execution or an empty string if there is no error. |
Return Values
None
Examples
The following example shows that the EvaluateJavascriptFinished event parses the JavaScript execution result via the JSONParser object:
//Event EvaluateJavascriptFinished JsonParser lnv_JsonParser Long ll_RootObject String ls_Type If Len(Result) > 0 Then lnv_JsonParser = Create JsonParser lnv_JsonParser.LoadString(result) ll_RootObject = lnv_JsonParser.GetRootItem() ls_Type = lnv_JsonParser.GetItemString(ll_RootObject, "type") If IsValid(lnv_JsonParser) Then Destroy (lnv_JsonParser) End If
See also