# New window popup problem

**URL:** <https://forum.kirupa.com/t/new-window-popup-problem/30505>\
**Category:** flash\
**Created:** [September 9, 2003, 7:46pm UTC](https://forum.kirupa.com/t/new-window-popup-problem/30505 "2003-09-09T19:46:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SoloDesignz](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@SoloDesignz](https://forum.kirupa.com/u/SoloDesignz)\
**Post date:** [September 9, 2003, 7:46pm UTC](https://forum.kirupa.com/t/new-window-popup-problem/30505/1 "2003-09-09T19:46:49Z")

</div>

[AS]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);”);  
}[/AS]

thats my code… Ok… works fine and everything, but when i run it on the web…  
the main page [www.blah.com](http://www.blah.com) , it doesnt work, but if i shift+click the intro link that loads the .swf … it works fine, but not if i just regularly click the intro link…  
im confused, does it have something to do with the javascript? i dont know anything about javascript so i cant really try and fix this myself =/

thanks alot 🙂
