权限被拒绝访问财产IFRAME
问题描述:
我有我的jsp页面的链接。
I have a link in my jsp page .
链接看起来像这样
<a href="javascript:doSomething('abc.ff' , 'abc.ff?m=1')">
JavaScript的code
the javascript code
function doSomething(url, url_progress){
parent.win1.location.href = url;
/* Wait until something surely has started! */
window.setTimeout("this.startFinally()", 1000);
this.startFinally = function (){
location.href = url_progress;
}
}
在这个用户clinks clinks一切工作正常。现在,最近我把这个code一个iframe内,然后什么也没有发生。我问过萤火虫,并得到这个错误:
When the user clinks on this clinks everything works fine. Now recently I put this code inside a Iframe and then nothing happens. I checked with firebug and got this error :
Permission denied to access property 'win1'
[Break On This Error] parent.win1.location.href = url;
可能是什么问题?
What can be the problem?
答
这可能是同源策略踢研究。是役一切从相同的主机/端口?
It's possibly the same origin policy kicking in. Is everything served from the same host/port?