aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Question on window.opener Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Question on window.opener" Watch "Question on window.opener" New topic
Author

Question on window.opener

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 375

I have a parent window that opens a pop-up window by clicking on a button on the parent window.

When I click the SAVE button in the pop-up window I am redirecting to another page that contains javascript code that updates the parent window then closes the child window.

However, after a microsoft patch we installed last week the javascript code is no longer working. Meaning the parent window reloads but it does NOT contain the reloaded info but is maintaining the same info before the page was reloaded.

Does the reload() event not reload the window without caching contents?

Here is the javascript code we are using and now no longer works:

if (window.opener) {
window.opener.location.reload();
}
window.close();

Is there a reason that this code would no longer work? Has anyone else experienced such an issue with caching after installing a microsoft patch?

Any help or direction would be greatly appreciated.

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
change

window.opener.location.reload();

to

window.opener.location.reload(true);
OR
window.opener.location.href = window.opener.location.href;

Eric
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Question on window.opener
 
Similar Threads
window.opener problem
close pop up window and redirect to parent window in struts2
Question on using window.opener
Reloading a parent window 1 after submit from window 2
Question on using showModalDialog