In Google Chrome, how do I bring an existing popup window to the front using javascript from the parent window? In Google Chrome, how do I bring an existing popup window to the front using javascript from the parent window? google-chrome google-chrome

In Google Chrome, how do I bring an existing popup window to the front using javascript from the parent window?


You can't. Window.focus is disabled in Chrome for security reasons, and that is unlikely to change.

You have to close and repopen the respective window.


Why not just do a popopWindow.focus() after the window.open call? It won't hurt to do it there too, and it should ensure that your new window is shown on top of the current one.


You need to set original window to blur and the new window to focus.

var popup = {  //popup = object literal representing your popup    execute = (function () {        popup.win = window.open();        popup.win.focus();    }());};window.blur();