Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2006, 10:41 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parent Page refresh gives "Permission denied" Erro

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



 
Old January 25th, 2006, 01:57 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Parent Page Refresh crmProg Visual Studio 2005 1 February 9th, 2007 09:56 AM
Parent Page Refresh crmProg ASP.NET 2.0 Professional 0 January 15th, 2007 10:58 PM
How to refresh parent page amolpayal Javascript How-To 1 August 2nd, 2006 05:03 AM
(0x800A0046) Permission denied,not IIS permission! David Hay Classic ASP Basics 3 April 30th, 2006 10:47 PM
Permission Denied hamidmq Javascript How-To 2 March 10th, 2005 09:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.