[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[备忘]不同域名的iframe下,fckeditor在chrome下的SecurityError,解决办法~~

上一篇:[整理]CAS单点登录,CAS Authentication Filter忽略jpg等文件的方法
下一篇:[备忘]hibernate的lazy取得某个字段,貌似不咋好使哈~~

添加日期:2013/12/19 16:53:44 快速返回   返回列表 阅读16558次
我这个fckeditor版本,不知道是几,反正在chrome下报错了

http://10.0.103.118:8080"的页面,用iframe嵌套了http://www.a.com:8080的页面,

后者的页面里使用了fckeditor,

然后就报错了。

Uncaught SecurityError: Blocked a frame with origin "http://www.a.com:8080" from accessing a frame with origin "http://10.0.103.118:8080". Protocols, domains, and ports must match. fckeditorcode_gecko.js:36

解决办法:
打开fckeditor\editor\js\fckeditorcode_gecko.js
---------------------------------
找到:


FCKTools.FixDocumentParentWindow = function(A){ if (A.document) A.document.parentWindow=A; for (var i=0;i<A.frames.length;i++) FCKTools.FixDocumentParentWindow(A.frames[i]);};



修改为:


FCKTools.FixDocumentParentWindow = function(A){try{ if (A.document) A.document.parentWindow=A;} catch(e){};for (var i=0;i<A.frames.length;i++) FCKTools.FixDocumentParentWindow(A.frames[i]);};



也就是try,catch了一下,就好使了~~汗~~
 

评论 COMMENTS
guest1065782759
2015/4/23 15:31:52
终于找到正确答案了~十分感谢
guest806863043
2015/10/20 17:51:54
#Q
guest117837859
2016/1/16 20:09:36
<svg/onload=alert(1)>

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved