parent window refresh problem

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 window on close of child window

Thank you in advance

srikanth


[1321 byte] By [srikanthbakki] at [2007-12-24]
# 1

Hi!

Thanks for asking! I'm a member of the ASP.NET team, and was just popping over here to see what was going on. The best place to ask ASP.NET questions is over on the ASP.NET forums at http://www.asp.net/welcome.aspx?tabindex=1&tabid=39

My first question would be why you have to have the parent page refresh the page every 60 seconds, why can't you simply have the child page do the parent page refresh? That way, you get the refresh to happen, only on demand.

If that's not going to work, I'd look into Atlas/Ajax components that will allow you to refresh only the components you need, instead of refreshing the entire page.

HTH,
PEte

PeteL-MSFT at 2007-10-8 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2
Hi, try to put the code in the Body of the page, not in the head... ;)
Cyberpunker at 2007-10-8 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified