Click to See Complete Forum and Search --> : Reloading parent page from a iframe pop
The Jonathan
03-12-2003, 09:52 AM
Hello.
Im having a bit of a dilema.
Im opening a pop up window from inside an iframe.
The popup contains this code
<script language="JavaScript" type="text/javascript">
var myTimeout=setTimeout("closeWindow()",3000);
function closeWindow() {
window.opener.location.reload();
window.close();
}
</script>
This closes it and reloads the iframe, but what I want it to do is reload the entire page that the iframe is on instead.
Any ideas? Thank you.
gil davis
03-12-2003, 10:02 AM
Instead ofwindow.opener.location.reload();
Trywindow.opener.top.location.reload();
The Jonathan
03-12-2003, 10:35 AM
Well, I feel moronic now...
I cant believe I didnt try that, I tried
window.opener.top.reload();
And just about everything else, and I almost tried that one, but I gave up and came here...
Thank you very much.
The Jonathan
03-12-2003, 10:45 AM
Ive come across an odd problem.
It works on every page on my site, but when I go to a page in the forums with a url such as this
index.php?&act=ST&f=2&t=2&st=0&
It no longer works, the pop up just stays, it never closes and the page doesnt refresh.
Any Ideas why?
The Jonathan
03-12-2003, 02:05 PM
This is really odd, sometimes this will work perfectly, but then then for apparantly no reason itll just stop working. It starts giving me a Permission denies error, and as soon as it does it once it wont work anwhere else on my site... even though it did just a few minutes before.
Any reason this is happening? Any ideas how to fix it?
Thanks.
gil davis
03-12-2003, 02:39 PM
"Access Denied" is a security warning that you are trying to script across domains. If you ever load a page that is not in the same domain, you get stuck in that condition until you start over.
The Jonathan
03-12-2003, 03:02 PM
I see, so even though its on the same server if its called in one of the forums pages it thinks its a seperate server and will make it inactive across the rest of my site. Damn.
I wonder why it does that, and why it only messes it up only on the forums pages.