views:

104

answers:

2

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(); 
+1  A: 

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

open (URL, windowName[, windowFeatures])

Joel Etherton
I am using : win= window.open(Window,"child","top=250,left=310,Width=300,Height=150,Location=no,Scrollbars=no") win.focus();
Ankit
you'll need to give the second window a new name. Try win=window.open(Window, "child2", ....) win.focus(); You may also try name it _blank since that is the default standard for browsers to open a new window.
Joel Etherton
+1  A: 

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

David Waters