This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Question on window.opener

 
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change

window.opener.location.reload();

to

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

Eric
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic