ScriptCompleted Event  
 

The ScriptCompleted event occurs when an asynchronous script execution completes.

Syntax

Sub object_ScriptCompleted ( [Index As Integer,] ByVal Response As String, ByVal StatusCode As Long )

Remarks

The ScriptCompleted event is raised when a script execution initiated by the application completes. The Response argument specifies the string returned by the script, and the StatuCode value indicates success (1) or failure (0). If the script contained errors or could not be executed, the status code will be zero. Applications typically use this event to retrieve values from the page, execute custom logic in response to script results, or detect when asynchronous script operations have finished. Because script execution is asynchronous, this event is the definitive way to know when a script call has finished.

See Also

AsyncExecute Method, PostWebMessage Method