EvaluateJavascriptFinished

Description

Occurs after the EvaluateJavascriptAsync function is executed.

Event ID

Event ID

Objects

None

WebBrowser controls


Arguments

Argument

Description

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.

error

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

AddressChanged

CertificateError

DownloadingStart

DownloadingStateChanged

NavigationError

NavigationProgressIndex

NavigationStart

NavigationStateChanged

PdfPrintFinished

ResourceRedirect

TitleTextChanged