Solved

Problem closing child browser window in IE10

Posted on 2013-01-25
6
1,406 Views
Last Modified: 2013-02-04
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
Comment
Question by:ttitus
  • 3
  • 3
6 Comments
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 38822004
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
 

Author Comment

by:ttitus
ID: 38829028
Nope, didn't work.  The window still stays open.
0
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 38829602
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
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!

 

Accepted Solution

by:
ttitus earned 0 total points
ID: 38833606
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
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 38833714
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
 

Author Closing Comment

by:ttitus
ID: 38850416
Self solved with further research
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Jquery form 9 39
Google Tag Manager - Add Trigger Using Div class 22 53
Hit counters in SharePoint 2013 2 21
title attribute 5 22
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question