function popUp(theURL, myWidth, myHeight) {
var winName = 'feedback';
var features='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0';
//var myWidth = 290;
//var myHeight = 360;
var isCenter = 'true';
if(window.screen)if(isCenter)if(isCenter=="true"){
var myLeft = (screen.width-myWidth)/2;
var myTop = (screen.height-myHeight)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
var handle = window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
handle.opener = window;
handle.focus();
return handle;
}
Snippet codes and other stuff good to remember. Various source codes, tips and other things I encountered while working
Sunday, July 02, 2006
Centered popup window
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment