Get popup center

function get_popup_center(popurl)
{

var top = (screen.availHeight/2)-61;
var left = (screen.availWidth/2)-150;
var width = 300;
var height = 150;
//var popurl = ‘https://www.svnlabs.com’;

var oWin = popUp(popurl, top, left, width, height);

}

function popUp(URL, top, left, width, height)
{
day = new Date();
id = day.getTime();

eval(“page” + id + ” = window.open(‘”+URL+”‘, ‘” + id + “‘,’toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=”+width+”,
height=”+height+”,top=”+top+”,left=”+left+”‘);”);
return “page” + id;
}

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch