Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open popup from another popup

I am trying to open a popup window from another popup window using window.open method but it is simply opening the second popup in the previous popup window.

Code I am currently using:

win= window.open(Window,"child","top=250,left=310,Width=300,Height=150,Location=no,Scrollbars=no") win.focus(); 
like image 400
Ankit Avatar asked Jan 20 '10 13:01

Ankit


2 Answers

Make sure you're using a new name for your second new window. If you provide the same name you'll experience this behavior.

open(URL, windowName[, windowFeatures]) 
like image 91
Joel Etherton Avatar answered Oct 27 '22 12:10

Joel Etherton


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

like image 22
David Waters Avatar answered Oct 27 '22 12:10

David Waters