But, I have been trying a lot of different things with the Javascript code for the swfupload function in 'index.index.phtml' admin template to see if I could resolve it.
And it seems like the "document.observe('dom:loaded', function() {...})" function is giving the problems in IE8 because in the swfupload demos they dont call the script with this function.
So I removed the above function in 'index.index.phtml' by just deleting line 185 and line 223 and now seems to be working all the time in IE8.
The javascript for swfupload in 'index.index.phtml' now looks like this and it works:
Code
<script type="text/javascript">
// <![CDATA[
var swfu;
var settings = {
flash_url : "admin/swfupload.swf",
upload_url: (Prototype.Browser.IE ? "" : "../") + "index.php?a=upload&path=<?php echo $this->path; ?>", // Relative to the SWF file
post_params: {"<?php echo session_name(); ?>": "<?php echo session_id(); ?>"},
file_size_limit : "<?php echo $this->uploadLimit; ?>B",
file_types : "<?php echo implode(';', $fileTypes); ?>",
file_types_description : "All Files",
file_upload_limit : 100,
file_queue_limit : 0,
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: false,
// Button settings
button_image_url: "images/uploadFileButton.png", // Relative to the Flash file
button_width: "100",
button_height: "40",
button_placeholder_id: "uploaderContainer",
// The event handler functions are defined in handlers.js
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : queueComplete // Queue plugin event
};
swfu = new SWFUpload(settings);
$('btnCancel').observe('click', function (ev) {
swfu.cancel();
});
// ]]>
</script>