Click to See Complete Forum and Search --> : parent.location.reload(true) doesnt work properly


sjeelani
10-15-2003, 03:43 PM
Hi,

I have three windows namely GrandParent (GP), Parent (P) and Child (C). All the three windows are pop-up windows.

I want to refresh Parent pop-up window when I open the child window. The requirement is to fill the radio button of that particular child window URL, when user clicks on the URL.

I used the following code:
OpenChildWindow() {

window.open("theurl", "windowname","location properties");
parent.location.reload(true);
}

I also tried self.parent.location.reload(ture), self.opener.parent.location.reload(ture)

the code sometimes works, but sometime doesnt refresh.
I tested in IE6 and Netscape 7.

Any help will be appreciated.

Thanks,
Jeelani

gil davis
10-15-2003, 04:40 PM
It would not surprise me to find out that the second time you call it, you get an error like "Object Not Found". When you reload a window, it no longer has the same memory space, and loses all previous parent/child relationships.

If this is the case, in IE there should be a yellow triangle in the lower left corner of the screen and in NS you can open the JavaScript console in the Tools menu to see any errors.

sjeelani
10-15-2003, 04:45 PM
As I am calling the javascript from the parent window, the code will not give any error in both IE and Netscape.It actually works most of the times,but sometimes, even it refreshes, the radio button is not updated. I set the no-cache in the html header.

Thanks,
Jeelani

Khalid Ali
10-16-2003, 12:04 AM
use
window.location.reload(true);
It should be pretty reliable with NS browsers,however,IE has its own reasons for caching documents.

guest
12-08-2005, 12:25 AM
window.open(window.parent.location.reload(true),"_parent","")

This works in both Mozilla as well IE


---- MadPrat