权限被拒绝访问财产IFRAME [英] Permission denied to access property in IFRAME

查看:144
本文介绍了权限被拒绝访问财产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?

这篇关于权限被拒绝访问财产IFRAME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆