parent.location.reload in iframe not working IE
I need refresh in parent site / refresh my browser when I click testing. I have source index.php:
<iframe id="test" src="/careertest/q.php"></iframe>
and in q.php:
<a href="#" onclick="parent.location.reload(true);">testing</a>
Its working in FF LAtest version + Chrome but not working in IE 9.
He said "script70 :Permission denied."
I am already change
parent.location.reload(true)
with:
window.parent.location =window.parent.location.href;
or
开发者_JAVA技巧document.domain=document.location.href;
but still not working...
use this function
function reloadParentPage() {
var selfUrl = unescape(parent.window.location.pathname);
parent.location.reload(true);
parent.window.location.replace(selfUrl);
parent.window.location.href = selfUrl;
}
Try adding "window" after parent.
parent.window.location.reload(true);
This works in IE, Chrome and Firefox and may be others
window.top.location.reload();
精彩评论