473,657 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.locatio n.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 3469
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.locatio n.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=windo w.open(url,name ,attr);
checkwindowclos e();
}

function checkwindowclos e () {
if (dialogwin.clos ed) {
location.reload ();
} else {
setTimeout("che ckwindowclose", 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('isC losed(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.locati on.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
40032
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 content as it has been filled out be the user.
1
8132
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 data, submit). The second command does work alone, while the first there is not way to make it work. Suggestions? I read someone having the same problem on devshed, unsolved for him/her, too.
3
2289
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() ? ) and the guestbook page has to refresh itself in a frame called 'inhoud'... can somebody help me pls ?
19
31043
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(). The problem is that after the reload, it brings you right to the top of the page. When I click 'refresh" on the original page, it brings me back to the original viewing position. Is there a way to duplicate this in from the popup window. Also,...
2
2499
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 window.opener.location.reload(true) function and show the newly selected country. Well, when I try it from my MAC box I get an Access denied error but when I do it from my IIS box it works. Both environments are using the same exact function to open the popup. In fact...
9
5436
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 answer or solution for this? I'm trying to do this: top.frames.location.reload(); Thanks Mark Howells www.permanenttourist.ch
2
6997
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 some funtionality, then I have this, which still needs
5
4444
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 the user then clicks on a link again on the redirected page and repeats the process (ie, processes more information) the opener.location.href does not change the parent window. All of the same code is getting executed. Can anyone tell me why...
0
8826
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7330
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.