# Pop Up Window Problem

**URL:** <https://forum.kirupa.com/t/pop-up-window-problem/207084>\
**Category:** Uncategorized\
**Created:** [November 14, 2006, 4:59pm UTC](https://forum.kirupa.com/t/pop-up-window-problem/207084 "2006-11-14T16:59:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdem78](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mdem78](https://forum.kirupa.com/u/mdem78)\
**Post date:** [November 14, 2006, 4:59pm UTC](https://forum.kirupa.com/t/pop-up-window-problem/207084/1 "2006-11-14T16:59:32Z")

</div>

Hi,  
I found the centered pop up window forum on here very useful. I copy/pasted the code to put on my button and I have the images width and height set and somehow I keep getting white borders around the whole image and sometimes the bottom of the image gets chopped off? Any ideas? Thanks for the help!

Here is what I have on the button itself:

on (release) {  
// customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “[http://www.mikedemarzo.com/nittany.htm](http://www.mikedemarzo.com/nittany.htm)”;  
target\_winName = “Nittany”;  
width = 576;  
height = 384;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
// sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

Then on the action keyframe I have this:

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);”);  
}
