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

Notification

Icon
Error

Options
Go to last post Go to first unread
paulmckillop  
#1 Posted : Tuesday, June 5, 2007 5:43:03 PM(UTC)
paulmckillop

Rank: Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 12

Hi guys,

we have just downloaded the ImageUploader Dual a few days ago and are working with a trial version with the view to integrating it into our site. One of the issues we are having is:

The Java Applet crashing in Firefox regularly (I have not tested the Java applet much in any other browsers yet). I have got the ActiveX version working reliably in IE (ver.6), I don't think it has crashed once, apart from when I made a clear javascript coding error. Another issue is that while I have the ActiveX version successfully uploading files, the Java Applet (when it doesn't crash) doesn't upload the files - although I haven't investigated this particular issue that much, so I don't know if it's related, or whether it is just me.

I am using a method simlilar to the Open File Dialog sample, with the 'Desktop' etc shortcut buttons in HTML, the ShellComboBoxWriter and a TwoPane view. It may or may not also be worth mentioning that our webapp is not loading the applet/activeX component on page load, but rather it is loaded into the page on a button click.

I'm just wondering if there is a general known issue with the Java Applet and maybe some particular javascript code that I should avoid to make it more stable? Or any other advice you can give me on this issue. This is the single biggest issue related to whether or not we integrate this into our site. Otherwise, we really like the ImageUploader app a lot, and would use it in future projects also.

Thank you for your time,

PAUL.

Alex Makhov  
#2 Posted : Wednesday, June 6, 2007 4:39:55 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello Paul,

You could make some things with Image Uploader before it is completely initialized and it could be the reason of the problem. So please use all initial actions in fullPageLoad event listener, not before.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

paulmckillop  
#3 Posted : Wednesday, June 6, 2007 5:29:00 PM(UTC)
paulmckillop

Rank: Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 12

Ok, will do and I'll let you know how I get on.

Cheers,

PAUL.

paulmckillop  
#4 Posted : Monday, June 11, 2007 5:26:18 AM(UTC)
paulmckillop

Rank: Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 12

Just an update on this.

The applet is now not crashing firefox as often, as I have fixed a problem with my code. I am using an 'Open File Dialog' style implementation, and when I clicked on any of the shortcut folder buttons (e.g. 'My Desktop'), I was having problems. Turns out that the elements I was using for these buttons (the 'Open File Dialog' sample uses too), they actually submit a form if you click them in firefox, but not in IE. I do not use the element a lot, so I did not know. Obviously, submits a form, but I didn't realize a element did the same in Firefox. Anyway, the IU applet sits inside a form, and when that form is submitted, the section which holds the ImageUploader (and other things) is closed and it's innerHTML emptied (no more ImageUploader). So when I clicked 'My Desktop', the form was submitted, the section was closed, Image Uploader was no more, and the javascript action 'GoToFolder(1)' was being tried on an object that did not exist on the page - so it malfunctioned and sometimes crashed.

As Alex recommended, I have moved my post-ImageUploaderWriter creation code into an "InitComplete" event listener. Not the fullPageLoadListener as Alex exactly recommended, as that did not work when I tried it (the code was not being run); my page is already fully loaded before I even define the ImageUploaderWriter object (it occurs on a button click) - maybe this is why fullPageLoadListener was not working, but the "InitComplete" event listener should be safe here, right? As the page is definitely fully loaded.

I am left with several issues that I am painstakingly trying to work through. If anyone can shed any light on them or point me in the right direction, I would be very grateful.

---------------

MAIN PROBLEMS

---------------

1) When I upload files with the applet, the "Progress" event listener never gets called when Status == "Complete". It gets called for START, PREPARE AND UPLOAD, but never for COMPLETE. I get an error in the javascript console right after I click 'OK' on the 'Upload Complete' alert dialog. All the error says is 'undefined is not a function'. I thought maybe could be related to the 'RedirectUrl' parameter being empty. But I set the RedirectUrl to certain page, and I still got the javascript error and it did not redirect. This works fine in IE/ActiveX. If it matters, I currently have 3 event listeners registered: "Progress", "InitComplete" and "UploadFileCountChange".

2) The applet rarely if even crashes the first time it is loaded on the page. But if I open and close one a few times, or open and close several different ones, then it seems that it crashes after several of these. Bare in mind that I am not redirecting after uploading images, it is all handled in javascript, and the last actual page load may have been quite some time ago - all the action on this page happens with AJAX. So when some one successfully uploads images, or opens the ImageUploader and just decides to close it, the div that contained that ImageUploader is emptied (innerHTML = ''). Is there anything in particular I can do to tidy up after I close an Image Uploader? Are there any resources I need to free up? Is there an imageUploader.close() function or anything similar? Do I need to clean up memory used by javascript? Is there anything else I need to do to make this scenario more stable? The ActiveX component is solid in all these scenarios.

3) I cannot easily specify specific code for each ImageUploader on my page (list of data items, each could have an ImageUploader created on the same page). Passing an ID into the "InitComplete" event listener as an argument would be ideal, but not possible. I got round this successfully for the "Progress" event listener, by sending the id into the function on the StatusText parameter, as Alex suggested; but there are no parameters to use in this way for the InitComplete" event listener. My options are to specify a different function name for each id, but this means writing a lot of different functions to the page dynamically, which is horribly messy, when I could have 100s of data items on the page (but typical amount is 80). Or I could possibly try to modify the iuembed.js code myself to allow a parameter to be passed on to the "InitComplete" event listener, not sure if that is possible. Are there any other possibilities I am not seeing?

----------------------

LITTLE ISSUES WITH IE

----------------------

4) IE throws a JS error when I try to call iu.getUploadFileCount(), or iu.getAnything() in the UploadFileCountChange event listener. Firefox has no problem with it at all. I have, of course, called 'var iu = getImageUploader( 'ImageUploader' + id );' before this. The IE error is the general 'Object doesn't support this property or method'

5) The 'details'/'thumbnails' buttons, which call 'getImageUploader( 'ImageUploader' + id ).setFolderView(0)' now doesn't work in IE, but they do work in firefox. 'getImageUploader( 'ImageUploader' + id ).GoToParentFolder()' still works fine in IE. And .setFolderView(0) used to work yesterday!

-----------------

GENERAL QUERIES

-----------------

6) Can Applet not upload EXIF detail?

7) UploadThumbnailAdd(...) method does not work for the applet, this is documented. So there's no way of uploading more than 3 thumbnails with the applet?

Regards,

PAUL.

Sugarcube  
#5 Posted : Monday, June 18, 2007 3:13:37 AM(UTC)
Sugarcube

Rank: Member

Groups: Member
Joined: 6/18/2007(UTC)
Posts: 1

FOR THE ATTENTION OF ALEX MAKHOV

I'm not sure if this post has escaped your notice due to it being on Page 2 of the postings for a while now. I would be most appreciative if you can help Paul out with this problem. Many thanks in advance.

Alex Makhov  
#6 Posted : Tuesday, June 19, 2007 9:01:22 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

I have already answered Paul several days ago with a PM.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

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.