# Multiple javascript popups... How can I?

**URL:** <https://forum.kirupa.com/t/multiple-javascript-popups-how-can-i/42103>\
**Category:** Uncategorized\
**Created:** [February 5, 2004, 7:22am UTC](https://forum.kirupa.com/t/multiple-javascript-popups-how-can-i/42103 "2004-02-05T07:22:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcutter](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@tcutter](https://forum.kirupa.com/u/tcutter)\
**Post date:** [February 5, 2004, 7:22am UTC](https://forum.kirupa.com/t/multiple-javascript-popups-how-can-i/42103/1 "2004-02-05T07:22:01Z")

</div>

I found your “Using JavaScript to Open New Window” ( [http://www.kirupa.com/developer/flash5/newwindow.htm](http://www.kirupa.com/developer/flash5/newwindow.htm) ) tutorial very helpful… However I am now trying to create a flash portfolio with many pop up windows. It seems this script will only call up one window. How can I call up multiple javascript popups that are sized?? any help would be greatly appreciated!:hr:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2004, 11:25am UTC](https://forum.kirupa.com/t/multiple-javascript-popups-how-can-i/42103/2 "2004-02-05T11:25:13Z")

</div>

when you click on the button try using gotoAndPlay like this:

on (release) {  
gotoAndPlay(5);  
}  
in frame 5 insert the code for the first pop-up, in frame 7 the code for the second pop-up, …and so on.

It worked for me.  
Good luck.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2004, 11:29am UTC](https://forum.kirupa.com/t/multiple-javascript-popups-how-can-i/42103/3 "2004-02-05T11:29:23Z")

</div>

Hi,

You can open as many pop up windows as you want as long as  
you name them differently.

What you want do to that code in the tutorial is:

Make the Launch function (in JavaScript) accept a second parameter for the name of the window to be opened. like so:

```php

<SCRIPT LANGUAGE="JavaScript"> 
<!-- Begin 
function Launch(page, winName) { 
OpenWin = this.open(page, winName, "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=550,height=250"); 
} 
// End --> 
</SCRIPT> 

```

And when you call it pass that name of the window to the function as well as the url. like:

```php
 javascript:Launch('http://www.multisite.be','myWindow')

```

to open a new window:

```php
 javascript:Launch('http://www.kirupa.com','anotherWindow')

```

to open new content on the first window:

```php
 javascript:Launch('http://www.milocreative.com','myWindow')

```

and so on…

SHO
