Rank: Member Groups: Member
Joined: 10/28/2008 Posts: 12
|
Good Evening,
I would like to start by apologizing for my incompetence in JavaScript. None-the-less, I've been messing around trying to figure this out and I'm only getting frustrated. First, I can't figure out how to turn off the default debug error message. Second, I'm using the AJAX Uploader and I need a custom error message when the user enters an unsupported file format. If at all possible, I would like the error message to tell them which file or extension it was. I've tried looking at the help in the documentation that came with the uploader but due to my lack of experience with JavaScript, I can't really hash it out. Any help or guidance would be very much appreciated.
Respectfully, Dekaiden
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, 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)
{
if (error == "max_size_exceeded")
alert("custom message for max_size_exceeded!");
......
}
You can see a complete list of possible "error" values here: http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.clientside_error_handler.htmlHope this helps. Thanks
|
Rank: Member Groups: Member
Joined: 10/28/2008 Posts: 12
|
Good Evening,
I've already looked at those but don't really know how to get them to work. I've already tried a few variations. Is there a completed (or nearly completed) example I could look at?
Respectfully, Dekaiden
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Here is a working example: http://www.essentialobjects.com/Demo/Default.aspx?path=AJAXUploader\_i12You can check the source code to see how it works. Thanks
|