I am using Uploadify and have a pop up which is loaded by jQuery 开发者_运维知识库by Ajax. The page on which the popup lives on has an include to swfobject (from Google's Code Api) and the Uploadify button should appear.
This works great on FF and Chrome but IE gives me a javascript error
Unknown runtime error line 4 character 5942
Anyone got any ideas how to fix this problem?
It's possibly to do with the fact that I'm using it from within dynamic content.
I found the following link but there is no definitive answer
Possible answer
Use the unpacked swfobject.js version from the swfobject download. Go to line 435 in your unpacked file and change
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
to
jQuery(el).replaceWith('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>');
This will only work if you use jQuery...
That link I mentioned in my original post did indeed have the answer
I had to download the source swfobject.js file and edit the line mentioned to use $(el).replaceWith and that allows the uploadify() content to load without error.
Replace if (typeof (movieElement[key]) === "function") to if (typeof (movieElement[key]) === "function" && key.substring(0, 1) <= 'Z') in js file.
精彩评论