clientside_error_handler

Client side event handler when an error occurred on an EO.Web client side object.

Note: This is a prototype, not a function. You should provide a function that matches this prototype if you wish to handle the corresponding event on the client side. The prototype provides information about the arguments and return value of the function you provide.

Syntax
JavaScript
 clientside_error_handler(control, error, message)

Parameters

control
The Control that triggered this event.
error

A string error code. This parameter can have different values for different controls.

The following values are valid for an AJAXUploader control:

Error Code Remark
"in_progress" An uploading is in progress. EO.Web AJAXUploader raises this error when you try to submit the page while an uploading is in progress. While you can work on other part of the page while AJAXUploader is uploading files, you can not submit the page until the uploading is finished.
"max_size_exceeded" The size of the file(s) that you try to upload exceeded the limits set by MaxDataSize.
"time_out" AJAXUploader fails to get a response from the server after the time out period.
"extension_not_allowed" When user has chosen a file with an extension that is not in AllowedExtension list.
"aborted"

ASP.NET monitors the time consumed by each request based on httpRuntime -> executionTimeout value. If it takes longer than executionTimeout, ASP.NET aborts the request.

This causes ASP.NET to terminates the uploading process when uploading large files because it takes longer than executionTimeout to finish.

To avoid this problem, please modify your web.config and set executionTimeout to a larger value.

"module_required" You must add EO.Web.Runtime into your web.config's HttpModules list.
"unknown_error" An unknown error has occurred.

The following values are valid for a ProgressBar control:

Error Code Remark
"in_progress" A server side task is currently in progress.

The following values are valid for a Callback or CallbackPanel control:

Error Code Remark
"wrong_server_response"

The server responses OK, but response as if it did not see the Callback/CallbackPanel at all. In another word, it did not response in a way the client side has expected.

A common scenario for this to happen is your server side code dynamically created the Callback/CallbackPanel but did not recreate them during postback; or your server side code simply has set the Callback/CallbackPanel's Visible property to False during callback.

Another common scenario is the server has redirected to another page. For example, the page has been redirected to the login page due to session times out.

You should identify the root cause of the error and fix the code error if the issue was caused by code. Otherwise you should handle this error gracefully.

"server_error" An server error has occurred. This error is caused by your server side code. You should identify the root cause of the error and fix it.

The following values are valid for a Editor control:

Error Code Remark
"invalid_url"

The Url user entered is invalid.

message
A detailed error message.
Remarks

This is a prototype, not a function. You should provide this function if you wish to handle client side events raised by any EO.Web client side object.

Usually you would need to provide this function if you wish to customize or localize the error message. The default error message is in English.

See Also