Welcome Guest Search | Active Topics | Sign In | Register

AJAX Uploader: User friendly error messages Options
HT
Posted: Tuesday, August 26, 2008 3:47:29 PM
Rank: Advanced Member
Groups: Member

Joined: 3/18/2008
Posts: 41
Hi.

How can I show a user friendly error message when a user tries to upload a file with an extension that is not supported, or a file that is too large?

Thanks.

HT
eo_support
Posted: Tuesday, August 26, 2008 3:52:57 PM
Rank: Administration
Groups: Administration

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

You would handle the uploader's ClientSideOnError event. It will be something like this:

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


Code: JavaScript
function your_error_handler(control, error, message)
{
    if (error == "extension_not_allowed")
    {
        //do something.....
    }
}


You can find detailed information about this handler at here:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.clientside_error_handler.html

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.