Open popup from another popup

I am trying to open a popup from another popup using the window.open method, but it just opens a second popup in the previous popup.

The code I'm currently using:

win= window.open(Window,"child","top=250,left=310,Width=300,Height=150,Location=no,Scrollbars=no") win.focus(); 
+4
source share
2 answers

Make sure you use the new name for your second new window. If you specify the same name, you will experience this behavior.

 open(URL, windowName[, windowFeatures]) 
+7
source

If you don't care what the window name is instead of "child", use "_blank", which will always open in a new window. see W3Schools

+3
source

All Articles