trigger loadError

Use this trigger to notify the user about an invalid URL or other error returned by the embedded browser in the HTML widget.

trigger loadError
params
    numeric ErrorCode : IN
    string  ErrorText : IN
endparams
; Enter your code here ...
end
Applies to: Form widgets: uhtml (HTML Widget)
Activation: Activated when a problem is encountered in loading a URL into the HTML widget. The error code and error text are returned by the browser embedded in the HTML widget (the Chromium Embedded Framework (CEF)).
Default behavior: None
Behavior upon completion: None

Parameters

  • ErrorCode—error code returned by the embedded browser, such as -105 for an invalid URL.
  • ErrorText—text of the error returned by the embedded browser.

Description

By default, when a problem is encountered when loading a web page in the HTML widget, such as an invalid URL or a non-existing file, an empty page is displayed. This is not very useful to the user, so you can use the loadError trigger to notify the user of the error by displaying an error page or message with the details.

Using loadError

trigger loadError
params
    numeric errorcode : in
    string  errortext : in
endparams
message/info "%%errorcode%%%: %%errortext%%%"
end