Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

window.Open causes new window to appear behind parent

I was wondering if anyone knew of a way to prevent IE from popping up child windows behind the parent.

like image 311
The Sheek Geek Avatar asked Nov 03 '10 12:11

The Sheek Geek


1 Answers

Have you tried giving the new window focus?

newwindow = window.open(...);
if (window.focus) {
    newwindow.focus();
}
like image 88
stevelove Avatar answered Nov 14 '22 23:11

stevelove