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

Notification

Icon
Error

Options
Go to last post Go to first unread
Fedor  
#1 Posted : Wednesday, October 8, 2003 8:07:00 PM(UTC)
Fedor

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Just want to let know, that to handle Image Uploader events you can use not only C++-like syntax like this:

Code:
<object classid="clsid:BB6633E1-FE3B-41A1-A2D3-D08400D828BC" CodeBase="ImageUploader.CAB" 
	id="ImageUploader1" width="600" height="300">
... 
</object>
	
<script language="JavaScript">
function ImageUploader1::OnProgress(Status, ProgressTotal, ProgressMax, Progress, StatusText){
	if (Status=="COMPLETE"){
		alert("Custom Complete in JavaScript");
	}
}
</script>	


you can use and following one:

Code:
<object classid="clsid:BB6633E1-FE3B-41A1-A2D3-D08400D828BC" CodeBase="ImageUploader.CAB" 
	id="ImageUploader1" width="600" height="300">
... 
</object>
	
<script language="JavaScript" event="OnProgress(Status, ProgressTotal, ProgressMax, Progress, StatusText)" for="ImageUploader1">
if (Status=="COMPLETE"){
	alert("Custom Complete in JavaScript");
}
</script>	


========================================================
02/14/2008, Fedor
This topic is out of date.

You should use the following syntax:


Code:
iu.addEventListener("EventName", "FunctionName");


Example:

Code:
<script type="text/javascript" src="iuembed.js"></script>

<script type="text/javascript">
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText)
{
    if (Status=="COMPLETE"){
        //We redirect to galery.aspx page when upload process is completed
        window.location = "gallery.aspx";
    }
}

var iu = new ImageUploaderWriter("ImageUploader", 710, 500);

//...Any other params or event handlers...

iu.addEventListener("Progress", "ImageUploader_Progress");

//...

iu.writeHtml();
</script>


========================================================

Edited by user Wednesday, February 13, 2008 2:36:19 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
Users browsing this topic
Guest
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.