This code shows how to opena popup window in the center position
var userWidth = screen.availWidth;
var userHeight = screen.availHeight;
var leftPos; var topPos; var popW = 860; //set width here var popH = 620; //set height here
var settings = 'modal,scrollBars=no,resizable=no,toolbar=no,menubar=no,location=no,directories=no,';
leftPos = (userWidth - popW) / 2, topPos = (userHeight - popH) / 2; settings += 'left=' + leftPos + ',top=' + topPos + ',width=' + popW + ', height=' + popH + ''; window.open('popup.aspx', 'childForm', settings);
|
No responses found. Be the first to respond and make money from revenue sharing program.
|