Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
yihong  
#1 Posted : Tuesday, September 28, 2004 5:28:00 PM(UTC)
yihong

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.
yihong  
#2 Posted : Tuesday, September 28, 2004 5:29:00 PM(UTC)
yihong

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??
Fedor  
#3 Posted : Wednesday, September 29, 2004 12:15:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,509

Thanks: 3 times
Was thanked: 49 time(s) in 48 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
yihong  
#4 Posted : Wednesday, September 29, 2004 12:34:00 PM(UTC)
yihong

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?
Andrew  
#5 Posted : Wednesday, October 06, 2004 10:55:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 863

Thanks: 2 times
Was thanked: 25 time(s) in 25 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.
Users browsing this topic
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.