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???