|
Rank: Member Groups: Member
Joined: 11/15/2007 Posts: 26
|
Hi, I have some problems with the Upload Component. Sometimes I get errors like : Eo.Web.Controls Client Side Debug Message : EO.Web Control 'ctl00_CPH_AJAXUploader1' error message (set ClientSideOnError to handle this error): An unknown error has occured. You can turn off this message by setting EO.Web.Runtime.DebugLevel to 0 (Not recommended for debug build).
The other error is : Eo.Web.Controls Client Side Debug Message : EO.Web Control 'ctl00_CPH_AJAXUploader1' error message (set ClientSideOnError to handle this error): AJAX call to the server times out. You can turn off this message by setting EO.Web.Runtime.DebugLevel to 0 (Not recommended for debug build).
How can I avoid these errors ? Thanks for your support
Stan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
That usually occurs when there is a network problem. For example, if the network is disconnected during the upload, you would get either of those two messages. So the message is basically the AJAX equivalent of IE's "Can not open page".
I do not see any way to completely avoid such problems, but you can handle the uploader's ClientSideOnError event to display a user friendly error message and askes the user to try again.
Thanks
|
|
Rank: Member Groups: Member
Joined: 11/15/2007 Posts: 26
|
Woww..I m surprised by the quick reply. So my quick question is : Do you have any example for the handling the clientsideonerror by your side ?
By the way, is there a way to set the "debug" mode to off ? Thanks
Stan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, In order to handle ClientSideOnError, you would do something like this:
Code: HTML/ASPX
<eo:AJAXUploader ClientSideOnError="your_error_handler" ....>
......
</eo:AJAXUploader>
Code: JavaScript
function your_error_handler(control, error, message)
{
//do whatever you like here, for example:
if (error == "time_out")
window.alert("time out!");
}
See this page for a complete list of error values: http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.clientside_error_handler.htmlTo set the debug mode off, set EO.Web.Runtime.DebugLevel to 0. Thanks
|
|
Rank: Member Groups: Member
Joined: 11/15/2007 Posts: 26
|
I thank you very much... Stan
|
|