Solved

Problem closing child browser window in IE10

Posted on 2013-01-25
6
1,415 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Suggested Courses

617 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