[SOLVED] Multiple Windows using window.open()


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.


try this,it will create new child, fiddle

var randomnumber = Math.floor((Math.random()*100)+1); 

Answered By – Voonic

Answer Checked By – Mary Flores (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *