# Popup problem

**URL:** <https://forum.kirupa.com/t/popup-problem/69310>\
**Category:** Uncategorized\
**Created:** [November 3, 2004, 5:04am UTC](https://forum.kirupa.com/t/popup-problem/69310 "2004-11-03T05:04:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SLow](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@SLow](https://forum.kirupa.com/u/SLow)\
**Post date:** [November 3, 2004, 5:04am UTC](https://forum.kirupa.com/t/popup-problem/69310/1 "2004-11-03T05:04:19Z")

</div>

I made a simple all flash web site. Something similar to a tutorial found on this website. I want to put a button in this site that once clicked on will open up a window to, lets say, [http://www.kirupaforum.com](http://www.kirupaforum.com) with a size of 500 x 500.

Currently I have this code in the first frame of the movie:

```auto
Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
 getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);");
 }

```

and this code on the button:

```auto
on (release){
 //url, winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable
 openWinCentre("http://www.kirupaforum.com","blank",500,500,0,0,0,0,0,0,1);
 }
 

```

It is not working when I test the movie, or when I load it to my server, but it does work from the .swf on my hard drive. I hope that I have described it correctly and I await for some replies.
