# Open new browser window

**URL:** <https://forum.kirupa.com/t/open-new-browser-window/27047>\
**Category:** Uncategorized\
**Created:** [July 29, 2003, 6:24pm UTC](https://forum.kirupa.com/t/open-new-browser-window/27047 "2003-07-29T18:24:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dream\_abstract](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@dream\_abstract](https://forum.kirupa.com/u/dream_abstract)\
**Post date:** [July 29, 2003, 6:24pm UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/1 "2003-07-29T18:24:43Z")

</div>

Hi

I’ve been trying to get my original flash movie to open up a new one in a separate browser window with no toolbars, menubars etc and to a specific size.

First of all I assigned this action to the button in my original flash file:

on (release) {  
getURL(“javascript:Launch(‘[http://www.mydomain/gallery.htm](http://www.mydomain/gallery.htm)’)”);  
}

then in the html page that the original flash sits I have:

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

```

This I copied direct from a tutorial from this site which suggests putting this file in the BODY tags. However when I try it out, I click on the button in the flash file and it opens up a new page but with nothing in it (i.e. not the requested html page) and just a copy of my getURL entry

javascript:Launch('[http://www.mydomain/gallery.htm’)’](http://www.mydomain/gallery.htm')')

which is dispayed in the location bar.

Anyone got any idea what might be going on?!

---

<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:** [July 29, 2003, 7:12pm UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/2 "2003-07-29T19:12:38Z")

</div>

try  
on (release) {  
getURL(“javascript:Launch(‘[http://www.mydomain/gallery.htm](http://www.mydomain/gallery.htm)’)”);  
}

TD

---

<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:** [July 29, 2003, 7:25pm UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/3 "2003-07-29T19:25:40Z")

</div>

sorry thats what i meant

on (release) {  
getURL(“javascript:Launch(‘[http://www.mydomain/gallery.htm](http://www.mydomain/gallery.htm)’)”);  
}

is what I’m using in the flash and it still aint working for some reason!

---

<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:** [July 29, 2003, 7:31pm UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/4 "2003-07-29T19:31:37Z")

</div>

Flash will only be able to use Javascript functions when it is exported with the – (forgot the name) option. It is much easier writing the javascript in Flash itself. Try this:

[AS]  
on(release){  
getURL(“java\*\*script:window.open(‘[http://www.yourserver.com/yourpage.html](http://www.yourserver.com/yourpage.html)’, ‘anything’, config=‘toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=451,height=472’);”)  
}  
[/AS]

---

<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:** [July 29, 2003, 7:57pm UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/5 "2003-07-29T19:57:03Z")

</div>

aha!

That worked except it also loaded another browser window with nothing in it behind it, any ideas why this is happening?

---

<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:** [July 30, 2003, 1:39am UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/6 "2003-07-30T01:39:01Z")

</div>

Have you seen this?:  
[http://www.kirupa.com/developer/mx/centered\_popup.htm](http://www.kirupa.com/developer/mx/centered_popup.htm)

---

<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:** [July 30, 2003, 9:13am UTC](https://forum.kirupa.com/t/open-new-browser-window/27047/7 "2003-07-30T09:13:05Z")

</div>

Thanks

That worked a treat…
