Multiple Windows using

So as we all know if you click on a submit button that has embedded in it a onClick( 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 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.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Give each window a new window name., WindowName)

Method 2

try this,it will create new child, fiddle

var randomnumber = Math.floor((Math.random()*100)+1);,"_blank",'PopUp',randomnumber,'scrollbars=1,menubar=0,resizable=1,width=850,height=500');

Method 3

Check this this might help you to open new window every time.

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>jQuery demo</title>
  <script src="jquery-1.9.1.js"></script>

$(document).on("click", "#btn", function(event) {"", '_blank');

<input type=button name="btn" id="btn">

Method 4, '', 'width=1000, height=500')

then, you get new popup every time to click popupbutton.

Method 5

In my case, the browser was blocking the pop-up window. I just allowed it to open the pop-up window.

Multiple Windows using

Method 6

You need to disable Track outbound links which will open only one window. Add the following javascript code to index.html file:

<script type="text/javascript">
  var clicky_custom = clicky_custom || {};
  clicky_custom.outbound_disable = 1;

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x