# Problem with centered pop up window

**URL:** <https://forum.kirupa.com/t/problem-with-centered-pop-up-window/127726>\
**Category:** Uncategorized\
**Created:** [November 5, 2004, 2:26pm UTC](https://forum.kirupa.com/t/problem-with-centered-pop-up-window/127726 "2004-11-05T14:26:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmoore](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rmoore](https://forum.kirupa.com/u/rmoore)\
**Post date:** [November 5, 2004, 2:26pm UTC](https://forum.kirupa.com/t/problem-with-centered-pop-up-window/127726/1 "2004-11-05T14:26:09Z")

</div>

I used the tutorial on this site to creat a centered pop up window…worked fine. then I added some input boxes and variables to pass username and score to a database, now my pop up window doesn’t work any more. I created a new file with nothing but the button and the same code I have in my real file, it worked fine. What is it about the variables and such that made my pop up quit working…here is my code

in button:  
on (release) {  
//customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “calculator.html”;  
target\_winName = “calculator”;  
width = 320;  
height = 410;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 1;  
resizable = 0;  
//sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

in action script layer:  
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);”);  
}

then I have input boxes on the same frame, different layer, on into the movie I have this to pass the variables:  
on(press) {  
var FirstName:String;  
var LastName:String;  
var EmplID:String;  
var Assignment4:String;  
FirstName = \_root.First;  
LastName = \_root.Last;  
EmplID = \_root.Empl;  
Assignment4 = \_root.Assignment4;  
loadVariablesNum(“insert4.asp”,0,“post”);  
}

anyone have any ideas what made the pop up quit working???
