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



Go to last post Go to first unread
#1 Posted : Friday, November 16, 2007 11:01:26 PM(UTC)

Rank: Advanced Member

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

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
One of customers contacted me and told me that RedirectUrl property does not work properly in Java version. I took a look and found out that everything is looking ok. And it was pretty weird - nothing appear in Java console, just no redirect occurs.

I examined the code closer and found out that it looks as follows:


if (iu.getControlType() == "ActiveX"){

        //... skipped for brevity

	function ImageUploader1_BeforeUpload() {
            //... skipped for brevity

	function ImageUploader1_Progress(Status, Progress, ValueMax, Value, StatusText) {
            //... skipped for brevity

iu.addEventListener("BeforeUpload", "ImageUploader1_BeforeUpload");
iu.addEventListener("Progress", "ImageUploader1_Progress");

As you see if you run this code under Firefox, getControlType will return "Java" and no event listeners will be defined.

I got a suspicion that if you run such code, Live Connect (mechanism which is used in Java applets to access DOM and JavaScript) will crash with some exception, and probably it will not work anymore. In particular it would mean that Image Uploader will not be able to redirect. Also, I guess no event handlers and maybe even no JavaScript methods will work.

I checked this suggestion on clean Basic Demo - just called addEventListener with invalid function name. And it proved my suspicion.

I hope guys will fix it in nearest updates. Meanwhile everyone who experience strange issues with RedirectUrl property or some JavaScript operations with Image Uploader in Java version, I suggest to make sure that all event listeners are specified properly.

Edited by user Tuesday, November 18, 2008 2:34:06 PM(UTC)  | Reason: Not specified

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.