|
Subject:
|
Parent Page refresh gives "Permission denied" Erro
|
|
Posted By:
|
mailtobsk
|
Post Date:
|
1/24/2006 9:41:52 AM
|
hi all
I have a page(Parent page) which refreshes every 60 seconds(using Meta Refresh). This page has links to open popup child windows . The child windows read user data ,process it and at the end refresh the main page and close itself.
In Parent page iam using
<meta http-equiv="Refresh" content="60">
in child windows iam using the javascript
opener.location.reload(); self.close();
This works fine when the child window processes and closes before the parent page refreshes itself.
But if the Parent page refreshes itself before the child window tries to refresh , then i get a
MicroSoft JScript runtime error :Permission denied
( at the line "opener.location.reload();")
I have tried using the following but it didnt work out
if(window.opener && !window.opener.closed)
Can any body suggest how to avoid this error.
This is a serious requirement for my application to refresh the parent page every 60 seconds and also to refresh the parent window on close of child window .
Thank you in advance
srikanth
|
|
Reply By:
|
vinod_yadav1919
|
Reply Date:
|
1/25/2006 12:57:32 AM
|
Hii mailtobsk!!
1>on child window try if(opener.document.all!=null||opener.document.all!='undefined') { //opener page is loaded sucessfully //reloade the page by child window. }
2>only IE support document.all before to reload the parent page,put the hidden field in parent page, that will be true on sucessfully loaded of parent page. Now from child window check if that value exist ,if exist then only reload the parent page ,otherwise wait for parent page to load completely.Set the timer for this.
You have have any other approach then let me know
Hope this will help you
Cheers :)
vinod
|