Saturday, December 29, 2007

JavaScript: Display a sized non-modal popup

// ***
// Displays a sized non-modal popup
// ***
function popUpSized(URL, width, height)
{
day = new Date();
id = day.getTime();
xwidth = width;
xheight = height;
xleft = (screen.width - xwidth ) / 2;
xtop = (screen.height - xheight ) / 2;
eval("page" + id + " = window.open(URL, '" + id + "', 'height=" + xheight + ",width=" + xwidth + ",left=" + xleft + ",top=" + xtop + ",toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1');");
}

No comments:

Post a Comment

Please use your common sense before making a comment, and I truly appreciate your constructive criticisms.