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
|
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.htmlhttp://essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.clientside_error_handler.htmlYou 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
|