Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

popup window close issue in case of multiple popups in Edge browser

$
0
0

This issue only happens in Edge, but works in IE11 and Chrome. Is there a way to get around this?

  1. Main window opens a 1st child window (Javascript “window.open” when end user clicks a link in the main window)
  2. Then when end user clicks a button in the 1st child window, JS will close this 1st child window.
  3. Then JS code has the main window opening a 2nd child window via JS code (“1st_child_window.opener.open")
  4. If end user tries to close this 2nd child window (either a button calling JS “window.close” or browser-provided-“X”-button) it works intermittently. Many times it can’t be closed and remains as blank popup window . It then can only be killed by “task manager”
  5. If step #2 is commented out, (that is, leaving the 1st child window open,) the step #4 can work properly (that is, 2nd child window then can be closed properly)

Code listing for step#2 and step#3

function showSecondChildScreen(url, FirstChildWindow) {
....
    var mainWindow = FirstChildWindow.opener;
    FirstChildWindow.close();
    var SecondChildScreen =   mainWindow.open(url,'passWin','width=700,top=120,left=200,titlebar=yes,resizable=yes,scrollbars=yes');
....
   }




Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>