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();
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();
Share
Improve this question
edited Jan 20, 2010 at 14:13
Doug Neiner
66.2k13 gold badges110 silver badges118 bronze badges
asked Jan 20, 2010 at 13:58
AnkitAnkit
2813 gold badges4 silver badges8 bronze badges
5
- @Banang - check out the tags. – Joel Etherton Commented Jan 20, 2010 at 14:01
- 2 Popup hell is so nineties... :-) – nfechner Commented Jan 20, 2010 at 14:01
- @nfechner - Poppy like it's 1999? – Joel Etherton Commented Jan 20, 2010 at 14:01
- I am using : win= window.open(Window,"child","top=250,left=310,Width=300,Height=150,Location=no,Scrollbars=no") win.focus(); – Ankit Commented Jan 20, 2010 at 14:04
- 1 I smell.... evil. And biscuits (morning here, sorry). – user1228 Commented Jan 20, 2010 at 14:05
2 Answers
Reset to default 8Make 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])
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