admin管理员组文章数量:1287577
top.location.href
doesn't work in IE8 from my facebook application when i redirect people to another URL.
Anyone have any other solution to redirect a user to another URL (It's need to redirect the URL outside the iframe, in this case the apps.facebook/application
URL and not my domain URL)
Anyone have any solution?
top.location.href
doesn't work in IE8 from my facebook application when i redirect people to another URL.
Anyone have any other solution to redirect a user to another URL (It's need to redirect the URL outside the iframe, in this case the apps.facebook./application
URL and not my domain URL)
Anyone have any solution?
Share Improve this question edited Feb 2, 2012 at 13:32 VMAtm 28.4k17 gold badges83 silver badges132 bronze badges asked Jul 15, 2011 at 20:01 Simon ThomsenSimon Thomsen 1,4217 gold badges28 silver badges37 bronze badges 3- Do you get a yellow triangle in the corner? – mplungjan Commented Jul 15, 2011 at 20:22
- It's working now with @VMAtm 's solution :-) – Simon Thomsen Commented Jul 15, 2011 at 20:41
- Very strange. Perhaps they have hijacked "top" – mplungjan Commented Jul 15, 2011 at 20:48
4 Answers
Reset to default 6Try to use window.top.location = "NEW_URL"
for the IE. Or, if your code is run from iframe
, parent.location = "NEW_URL"
Fairly old post, but I'd thought I'd share the solution that worked for me:
I found that when in an iFrame (within a Facebook Tab), I had to use
parent.location.href = "NEW URL";
I had the same problem and you would not believe what the error was... i added a line in de dsk of facebook (facebook.php)! I downloaded the latest version, but i think it wasn't updated since Auth2.0
Wrong:
protected static $DROP_QUERY_PARAMS = array(
'code',
'state',
'signed_request',
);
Right:
protected static $DROP_QUERY_PARAMS = array(
'code',
'state',
'signed_request',
'base_domain',
);
The redirect was only not working in IE, after this modification it worked..
top.location.href= "URL"
works for me, just make sure that the URL is absolute.
本文标签: javascripttoplocationhref doesn39t work in IE 8Stack Overflow
版权声明:本文标题:javascript - top.location.href doesn't work in IE 8 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741285711a2370256.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论