Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
How to catch the error information in ImageUploader3?
Rank: Member
Groups: Member
Joined: 9/5/2004(UTC) Posts: 4
|
When I submit images to script with ImageUploader3.0, maybe meet some errors, such as meet space limit or other error case. My question is how I can catch the error message? Currently, the imageuploader will get success, but no image is uploaded.
|
|
|
|
Rank: Member
Groups: Member
Joined: 9/5/2004(UTC) Posts: 4
|
May I control the "Status" parameter, and set it to error with my own error message??
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Hello, StatusText parameter contains response text from upload handling server page when Status equals "COMPLETE": Code:<script for="ImageUploader" event="Progress(Status, Progress, ValueMax, Value, StatusText)">
if (Status=="COMPLETE"){
alert(StatusText);
}
</script>
So way you can handle any custom response to Image Uploader. ========================================================02/14/2008, Fedor This topic is out of date. You should use iuembed.js syntax now: Code:<script type="text/javascript" src="iuembed.js"></script>
<script type="text/javascript">
function ImageUploaderID_Progress(Status, Progress, ValueMax, Value, StatusText) {
if (Status=="COMPLETE"){
alert(StatusText);
}
}
var iu = new ImageUploaderWriter("ImageUploaderID", 610, 500);
//...params...
//...other event listeners...
iu.addEventListener("Progress", "ImageUploaderID_Progress");
//...other event listeners...
iu.writeHtml();
</script>
======================================================== Edited by user Wednesday, October 29, 2008 12:39:40 PM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 9/5/2004(UTC) Posts: 4
|
I mean when the upload is exit by my script , when meet some errors ,exp: space limit, timeout.... How can I show these error message to user? Maybe I set the StatusText by backend script?
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
When Status is COMPLETE or ERROR, StatusText contains response from server (in other word, HTML returned by the script specified in Action param). For example, let's assume you are writing at ASP. You have default.asp (a page with Image Uploader) and upload.asp (a page which handles upload). If you will write something to Response in upload.asp (e.g. using Response.Write), it will be returned into StatusText argument of the Progress event. Therefore you can interchange data between upload.asp and default.asp. Hope this helps.
|
|
|
|
Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
How to catch the error information in ImageUploader3?
Forum Jump
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.