jquery uploadify IE下使用刷新页面时出现"SCRIPT5007: 缺少对象"
2014-09-18 15:37
726 查看
起因:ie多次加载uploadify3.2版本这个组件的时候,出现了SCRIPT5007: 缺少对象.
方法:
源代码:
SWFUpload.prototype.cleanUp = function(a) {
try {
if (this.movieElement && typeof(a.CallFunction) === "unknown") {
this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
for (var c in a) {
try {
if (typeof(a[c]) === "function") {
a[c] = null
}
} catch(b) {}
}
}
} catch(d) {}
window.__flash__removeCallback = function(e, f) {
try {
if (e) {
e[f] = null
}
} catch(g) {}
}
};
修正代码:
SWFUpload.prototype.cleanUp = function(f) {
try {
if (this.movieElement && typeof(f.CallFunction) === "unknown") {
this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
for (var h in f) {
try {
if (typeof(f[h]) === "function" && h[0] >= 'A' && h[0] <= 'Z') {
f[h] = null;
}
} catch(e) {
}
}
}
} catch(g) {
}
window.__flash__removeCallback = function(c, b) {
try {
if (c) {
c[b] = null;
}
} catch(a) {}
};
};
方法:
源代码:
SWFUpload.prototype.cleanUp = function(a) {
try {
if (this.movieElement && typeof(a.CallFunction) === "unknown") {
this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
for (var c in a) {
try {
if (typeof(a[c]) === "function") {
a[c] = null
}
} catch(b) {}
}
}
} catch(d) {}
window.__flash__removeCallback = function(e, f) {
try {
if (e) {
e[f] = null
}
} catch(g) {}
}
};
修正代码:
SWFUpload.prototype.cleanUp = function(f) {
try {
if (this.movieElement && typeof(f.CallFunction) === "unknown") {
this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
for (var h in f) {
try {
if (typeof(f[h]) === "function" && h[0] >= 'A' && h[0] <= 'Z') {
f[h] = null;
}
} catch(e) {
}
}
}
} catch(g) {
}
window.__flash__removeCallback = function(c, b) {
try {
if (c) {
c[b] = null;
}
} catch(a) {}
};
};
相关文章推荐
- jquery uploadify IE下使用刷新页面时出现"SCRIPT5007: 缺少对象"
- Uploadify IE出现了SCRIPT5007 缺少对象
- 使用jQuery的on("click")绑定事件莫名其妙地刷新页面
- IE中使用Uploadify文件上传插件报错: SCRIPT5007: 缺少对象
- F5当刷新页面,出现“要再次显示此页,web该浏览器,你曾经有过发送消息再次提交...点击重试",如何防止此对话框解决方案的出现,
- 开发日志:使用jquery读取id含./"等特殊符号的对象
- 使用Uploadify 时,同时使用了jQuery.Validition 验证控件时,在IE11上出现JS缺少对象错误。
- 记录使用了jquery uploadify flash版插件的页面在chrome浏览器崩溃问题的解决方法
- 使用Uploadify 时,同时使用了jQuery.Validition 验证控件时,在IE11上出现JS缺少对象错误。
- ASP.NET 使用response.redirect( "url ")跳转后,页面记录没刷新。
- 使用JQuery的get或post方法时出现页面没法手动刷新?
- 出现"会话状态已创建一个会话ID,但由于响应已被应用程序刷新而无法保存它" 解决方案
- 解决使用SmtpClient类时出现"不允许使用邮箱名称"的错误
- 使用On Error Resume Next语句,On Error Goto 0语句,Err对象来处理"运行时错误"
- 使用jquery 如何编写实现请求本页面的无刷新操作
- JavaScript在IE下设置innerHTML时出现"未知的运行时错误"
- 如何让刷新页面时不提示 "重试或取消”对话框
- Ajax同步链接在IE 与FireFox的使用差别 open("GET",url,false)
- JavaScript在IE下设置innerHTML时出现"未知的运行时错误"
- 使用fckEditor 出现"检测到有潜在危险的 Request.Form值"的解决方法! (网络整理)