Welcome Guest Search | Active Topics | Sign In | Register

How to show my own custom message for error ? Options
Emran Hussain
Posted: Monday, July 7, 2008 1:34:42 AM
Rank: Newbie
Groups: Member

Joined: 7/3/2008
Posts: 9
Hi,
I am using Ajax Upload control. I set maximum size to be 1MB. Ok, Now, if the user selects a file more than 1MB, then A message box is being shown with "EO. Debug level...etc....etc.." and instructing that, "In order to suppress this message, i should set EO.Web.Runtime.DebugLevel = 0; I did that, and now, if user selects a file larger than 1 MB, No message is shown.

I want to show my own dialog that, file size exeeded. How can I do that ? The control's default message box will confuse the user and they must not hav any idea that what is EO.Web.Runtime.DebugLevel = 0 ?. Am i Right ?

So, please help me to set my own dialog for this scenario.

Thanks.
Emran
eo_support
Posted: Monday, July 7, 2008 6:31:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

Here you go:

http://essentialobjects.com/ViewDoc.aspx?t=EO.Web.Control.ClientSideOnError.html
http://essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.clientside_error_handler.html

You will need to do something like this:

Code: HTML/ASPX
<eo:AJAXUploader ClientSideOnError="your_own_error_handler" ....>
....
</eo:AJAXUploader>


Code: JavaScript
function your_own_error_handler(control, error, message, args)
{
    if (error == "max_size_exceeded")
        ......
}


Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.