473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

location reload on window close

I'm popping a window to a page with a different dns than the parent, and
i want the opener's location reloaded when this window is closed.

With Mozilla it seems that all the opener's methods and properties are
protected because the dns are different. A security exception
(permission denied) is thrown every time i try to exec an
"opener.location.reload()" from the pop up window.

An alternative would be catching the window closing from the opener, but
i don't know how this could be done.

Thanks in advance.
alex.
Jul 23 '05 #1
2 3452
En/na alex bazan ha escrit:
I'm popping a window to a page with a different dns than the parent, and
i want the opener's location reloaded when this window is closed.

With Mozilla it seems that all the opener's methods and properties are
protected because the dns are different. A security exception
(permission denied) is thrown every time i try to exec an
"opener.location.reload()" from the pop up window.

An alternative would be catching the window closing from the opener, but
i don't know how this could be done.

Thanks in advance.
alex.

done :)

dialogwin=new Object()

function openwindow (url,name,attr) {
dialogwin=window.open(url,name,attr);
checkwindowclose();
}

function checkwindowclose () {
if (dialogwin.closed) {
location.reload();
} else {
setTimeout("checkwindowclose",500);
}
}
Jul 23 '05 #2
Well, as you said, you can try and detect the closing of the window
from the opener. this function sould do it:

w = open(...) //the variable w points to the new popup window
isClosed()

function isClosed(w)
{
if w.closed()
location.reload()
else
setTimeout('isClosed(w)', 500)
}
On Tue, 19 Apr 2005 12:13:58 +0200, alex bazan <me@privacy.net> wrote:
I'm popping a window to a page with a different dns than the parent, and
i want the opener's location reloaded when this window is closed.

With Mozilla it seems that all the opener's methods and properties are
protected because the dns are different. A security exception
(permission denied) is thrown every time i try to exec an
"opener.location.reload()" from the pop up window.

An alternative would be catching the window closing from the opener, but
i don't know how this could be done.

Thanks in advance.
alex.


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Gifford | last post by:
Hello, I'm right now using window.location.reload() to refresh the browser. It behaves as I would want in Mozilla/Netscape, but not in IE. I want to refresh a form, but keep the cached...
1
by: Plasson | last post by:
<script language="JavaScript"> window.opener.location.reload(); setTimeout(window.close(), 5000); </script> I have this code in a popup in which I let user login using PHP (2 passages: insert...
3
by: Chris Geerdink | last post by:
i made myself a guestbook. when people want to write in it, a pop-up appears with the form. now this is what i want to happen when they wrote in it: the pop-up has to close itself ( self.close()...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
2
by: ENIZIN | last post by:
I am having an interesting problem where I am simply trying to put in country selection popup window on my site. When the user closes the window the popup should call the...
9
by: permanent.tourist | last post by:
I'm having a hell of a job getting this to work in Safari: the only thing I can think of is that one can't use reload() across to another frame for security reasons. Does anyone have a concrete...
2
by: Sonnich | last post by:
Hi all! Probably simple - once one knows. I have a window, which open using <input type="button" class="box" name="main" value=" Add... " onClick=window.open('add.asp')> The window has...
5
by: senort01 | last post by:
Hi, I spawn a window, process some information, and then issue opener.location.href to change the location of the parent information. I then close the child window. Works great. However, if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.