...

View Full Version : reloading window.opener get permission denied error



rocket
07-11-2002, 12:33 AM
I searched around the site and have tried some suggestions, but have no success.

after some processing I am doing the folowing from the child window
<script>
window.opener.location.reload();
window.close();
</script>

This works for one of my pages, but for another page it displays the js error dialog with
Error: permission denied.
same error on IE 5.5 and 6.0

the url I am trying to reload is
www.some.com/index.html?dd=first&dfa=try_it&type=blank

it works in Netscape

any help would be greatly appreciated

glenngv
07-11-2002, 02:09 AM
are the 2 pages on the same domain? if it's not, then it might be one of the restrictions on cross-domain security.

rocket
07-11-2002, 02:32 AM
yes they are both in the same domain.

i open the child window with

newWin=window.open("url","windowname","h=300,w=300")

nothing really special

glenngv
07-11-2002, 02:41 AM
you provided a wrong link. It should be index.htm not index.html.
anyway, I can't see a link that opens in a new window, even the the code that opens a new window or even an external js.

and when do you call this

window.opener.location.reload();
window.close();

from the child window?

adios
07-11-2002, 02:44 AM
Wild guess:

<script type="text/javascript">
if (opener && !opener.closed) opener.location.reload();
setTimeout('self.close()',100);
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum