Javascript – Multiple Windows using window.open()

asp.netjavascript

So as we all know if you click on a submit button that has embedded in it a onClick(windown.open(...)) this opens a new window with all the lovely attributes you specify. However if then proceed to click on the parent window and again click on the 'submit' button without closing the previous popup window, then that same window is overwritten with the new data.

Now I need a way for that window.open() script to create new windows every time it is clicked. SO in theory I could click the parent "submit" button 2 consecutive times and have 2 different child windows appear.

I'm sure it's trivial but I can't seem to find anything.

Best Answer

Give each window a new window name.

window.open(url, WindowName)