开发者

Reloading or redirecting the parent from a child iframe in safari

I am generating an iFrame that following some processing with the frame (from an external site) redirects back to my domain (within the iframe), which should then reload the parent frame. However I've tried multiple ways of calling the parent, but none of them seem to work in safari?

methods use include.

self.parent.location="/";
self.top.location="/";
self.top.location.reload();

all of these just re开发者_开发知识库load the iframe. it feels like it is losing the parent / top reference due to the redirects within the iframe.


Actually I've encountered this problem before and I believe the root of the issue is that this is a browser-security related issue. Try this -- it worked for me:

var reloadParent = self.parent.location.reload();;
setTimeout("reloadParent", 500);

Hope this works for you.


This doesn't work?

parent.parent.location.reload(true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜