Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1428
  • Last Modified:

Problem closing child browser window in IE10

My code opens a child window which will fetch the "Updated.htm" page as a background process (if it is done as a foreground process, the animated GIF won't animate).

Once the page returns 200, then the parent window is refreshed, and then the small child window closes.

Everything works perfectly on all browser versions except for IE10.

On IE10, the parent window is refreshed, but the child does not close.

Any idea why the child does not close on IE10?
PageUpdate.htm
0
Tim Titus
Asked:
Tim Titus
  • 3
  • 3
1 Solution
 
Kiran Paul VJComputer EngineerCommented:
Not sure whether this works, just try.

Add this inside head that in PageUpdate.htm and check in IE10

<meta http-equiv="X-UA-Compatible" value="IE=9">

Open in new window

0
 
Tim TitusCTOAuthor Commented:
Nope, didn't work.  The window still stays open.
0
 
Kiran Paul VJComputer EngineerCommented:
Just add a button in  PageUpdate.htm and in onclick give

self.close();

want to know whether its a problem of self.close();


Also try this in your existing code

replace

self.close();


with

setTimeout(function() {

self.close();

}, 2000);
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Tim TitusCTOAuthor Commented:
Ok, here's the really interesting part.  I added alert() messages around the code to see where IE10 stopped working and discovered something very tricky:

My original code:
opener.Reload();
self.close();

Open in new window


I changed it to the following:
alert("Alert1");
opener.Reload();
alert("Alert2");
self.close();
alert("Alert3");

Open in new window


I discovered that IE10 processes the "opener.Reload();" and refreshes the parent window but it does not return from this to process the alert("Alert2");.

I changed this to the following and it works perfectly in IE10 as well as all other browsers now:
opener.location.reload();
self.close();

Open in new window

0
 
Kiran Paul VJComputer EngineerCommented:
I changed this to the following and it works perfectly in IE10 as well as all other browsers now:

Thats great... good to know its fixed.

You can close this question by selecting your own solution as answer.

-kiranvj
0
 
Tim TitusCTOAuthor Commented:
Self solved with further research
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now