s3-swf-upload-plugin icon indicating copy to clipboard operation
s3-swf-upload-plugin copied to clipboard

Uploader not loading in IE7

Open thoughtless opened this issue 15 years ago • 7 comments

I was having a problem with the uploader not loading in IE7. It would just show the "please upgrade" message.

The problem was that S3SwfUpload::ViewHelpers#s3_swf_upload_tag was generating some javascript that IE7 didn't like. I changed two things and now it works well:

  1. "onFailed: function(status){" became "onFailed: function(result_status){". "status" is something of a reserved word in IE. Using it as a variable name doesn't always cause a problem, but sometimes it does.
  2. I removed the trailing comma from the Hash that is passed to s3_swf_init.

thoughtless avatar Jan 09 '10 09:01 thoughtless

With these changes, the initial errors do go away. However I still get lots of "Object doesn't support this property or method" errors pointing to line 1 in IE8 and IE7 on load and every time I choose a file or click to activate the upload. In other words, I can't get this plugin to work in IE7 or IE8. Insight would be much appreciated!

glennfu avatar Jan 13 '10 20:01 glennfu

I pushed my changes to my fork: http://github.com/thoughtless/s3-swf-upload-plugin

thoughtless avatar Jan 13 '10 21:01 thoughtless

Thanks! I just checked it out, however I'm still getting the same issue. I get the error twice on line 1 (thanks IE for being so helpful), but thanks to your changes, I now also get the error pointed to this line:

<a href="#uploadform1" onclick="s3_swf1.upload('my_prefix/')">Press Here To Activate Upload</a>

glennfu avatar Jan 13 '10 21:01 glennfu

I wonder if there is some conflicting javascript elsewhere. My suggestion is that you install IE8 and try out their step-by-step debugging tool for developers.

thoughtless avatar Jan 13 '10 22:01 thoughtless

IE8 debugging shows the error thrown at this line: try { s3_swf1.SetReturnValue(__flash__toXML(s3_swf.init()) ); } catch (e) { s3_swf1.SetReturnValue(""); }

Putting a watch on s3_swf.obj() shows that it's a DispHTMLObjectElement. s3_swf.init() calls s3_swf.obj().init(), which fails since there's no init() method for DispHTMLObjectElements. Now that I look at that code... I don't even understand how it's supposed to work.

Thoughts there?

glennfu avatar Jan 14 '10 20:01 glennfu

BTW I get the same exact failure from going to http://demo-s3-swf-upload.heroku.com/ in IE

glennfu avatar Jan 14 '10 22:01 glennfu

Thanks for reporting and pursuing this! I only just became aware of this thread, for some reason thunderbird was thinking it was spam.

I hope you guys can figure it - as you probably know I just pulled this plugin from the original fork and tidied it up, I'm not intimate with the details, and this looks beyond me :(

GreenAsJade avatar Feb 13 '10 20:02 GreenAsJade