IE 的 Uploadify/swfobject 参数问题
我已经在应用程序中使用 uploadify 几年了,它一直运行良好。当我升级到 2.1.0 版本时,它现在与 swfobject 2.2 捆绑在一起。
在 firefox、safari 和 chrome 中,文件上传和一切都运行良好。然而,在所有版本的 IE 中,javascript 都没有正确地将任何参数传递给 flash 文件。
例如,调试buttonImg在uploadify js内部工作得很好,但是从flash文件内部它读取为未定义。再次强调,这只是 IE。
什么可能导致 IE 不将 js 参数传递给 flash 对象?我正在运行最新的 Flash 版本。
我在这里查看了其他相关帖子,似乎没有人解决了这个问题。根本没有 JavaScript 错误。 Flash 上传器会加载,甚至看起来可以工作,但只能使用默认值。
I've been using uploadify in an app for a few years and it has always worked fine. When I upgraded to the 2.1.0 version, it now comes bundled with swfobject 2.2.
In firefox, safari, and chrome, the file upload and everything works perfectly. However, in all versions of IE, the javascript is not passing any of the parameters to the flash file properly.
Debugging the buttonImg for example works fine inside of the uploadify js, but from inside the flash file it reads as undefined. Again, this is only IE.
What could cause IE to not pass js parameters to the flash object? I'm running the latest flash version.
I've checked into the other related posts here and no one seems to have solved this issue. No javascript errors at all. The flash uploader loads and even appears to work, but only with default values.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经进一步缩小了问题范围,但仍然不明白发生了什么。在 SWFOjbject 2.2,第 436 行中,javascript 尝试用新对象及其参数替换“el”元素。
当我发出“par”警报时,我看到参数列表,其中包含我期望的 flashvar。
我已经尝试过默认的 el.outerHTML 和 $(el).replaceWith 方法,但是当我尝试查看更新的“el”对象时,我看到的只是一些默认参数:
看起来 el 元素根本就不是被正确更换。当我在 Firefox 和 Safari 中尝试此操作时,html 会正确更新。
I have narrowed the problem down a bit further but still don't understand what's happening. In SWFOjbject 2.2, line 436, the javascript is attempting to replace the "el" element with the new object and it's parameters.
When I alert out "par" I see the list of parameters, complete with the flashvar that I would expect.
I've tried the default el.outerHTML and the $(el).replaceWith methods, but when I try to view the updated "el" object, all I see are some default parameters:
It just seems like the el element is simply not being replaced properly. When I attempt this in firefox and safari, the html updates properly.