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.