Get popup center

On August 6, 2009, in Javascript, PHP, Tips, Tricks, by admin

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 = ‘http://www.phpsolutions.co.in';

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;
}

One Response to Get popup center

  1. Anonymous says:

    Hi I discovered this web site in error once i was searching yahoo just for this issue, I’ve got to say your website is really helpful I also love the theme, its amazing!. I dont have a whole lot of time to read all your post right now but We have bookmarked it plus opted in for your RSS feeds. I will be last a week or so. appreciate your a fantastic site.

Leave a Reply