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

Notification

Icon
Error

Options
Go to last post Go to first unread
standev75  
#1 Posted : Friday, April 11, 2008 6:01:22 AM(UTC)
standev75

Rank: Newbie

Groups: Member
Joined: 4/11/2008(UTC)
Posts: 3

I am having problems with the PackageComplete event; specifically, it doesn't seem to be firing. Other events, such as PackageBeforeUpload, AfterUpload, are working correctly.

As well, just on a whim, I tried creating an event listener for the undocumented event PackageAfterUpload, and it does fire! However, it only seems to be passing the package index; I need the response as well.

I am using the trial version, if that makes a difference.

Please help :).

Stan
Eugene Kosmin  
#2 Posted : Friday, April 11, 2008 2:46:44 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Hello Stan,

Thanks for bug reporting. We reproduced this issue. There is PackageAfterUpload event in Java version instead of PackageComplete.

As for now you can use small workaround:
Code:
function ImageUploader1_PackageComplete(PackageIndex)
{
    // Handler for AX version
}

function ImageUploader1_PackageAfterUpload(PackageIndex)
{
    // Handler for Java version
}

var iu = new ImageUploaderWriter("ImageUploader", 800, 600);

//...

if (iu.getControlType() == "ActiveX")
{
	iu.addEventListener("PackageComplete", "ImageUploader1_PackageComplete");
}
else if (iu.getControlType() == "Java")
{
	iu.addEventListener("PackageAfterUpload", "ImageUploader1_AfterUpload");	
}
// ...
iu.writeHtml();

// ...


But event name will be fixed in the future versions.
Best regards,
Eugene Kosmin.
Aurigma Development Team
standev75  
#3 Posted : Friday, April 11, 2008 9:33:19 PM(UTC)
standev75

Rank: Newbie

Groups: Member
Joined: 4/11/2008(UTC)
Posts: 3

Thanks Eugene for the quick response! Much appreciated!

In addition to receiving the event, I also require the server response for processing.

E.g. in your api documentation, you list the following event handler method:

Quote:
function ImageUploaderID_PackageComplete(PackageIndex, ResponsePage) {
//...your code...
}



1. Will the ResponsePage parameter be supported in a future release?

2. Is there a workaround for this now?


Stan
Eugene Kosmin  
#4 Posted : Sunday, April 13, 2008 1:43:46 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 455

Was thanked: 27 time(s) in 27 post(s)
Quote:
1. Will the ResponsePage parameter be supported in a future release?


Yes, PageResponse will be supported.

Quote:
2. Is there a workaround for this now?


In current version you can get it only for ActiveX version, by modifying iuembed.js file:
Code:
...
case "PackageComplete":
    	eventParams = "PackageIndex";
    	break;

// change to:

case "PackageComplete":
    	eventParams = "PackageIndex, ResponsePage";
    	break;


Event handler should be changed too:
Code:

function ImageUploader1_PackageComplete(PackageIndex, ResponsePage)
{
    // Handler for AX version
}

function ImageUploader1_PackageAfterUpload(PackageIndex)
{
    // Handler for Java version
}
Best regards,
Eugene Kosmin.
Aurigma Development Team
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.