all groups > dotnet jscript > november 2004 >
You're in the

dotnet jscript

group:

open window on center of screen


open window on center of screen Albano Alves
11/9/2004 5:34:39 PM
dotnet jscript:
Hi,

Can anyone help me to open a window on the center of screen.
I try with screenX and screenY but doesn't work...

Thanks

Albano Alves

Re: open window on center of screen ruca
12/16/2004 12:49:17 PM
function center(url, w, h)

{

var winl = (screen.width - w) / 2;

var wint = (screen.height - h) / 2;

popup = window.open(url, "PopupWnd", "height==" + h + ", width==" + w + ",
left=" + winl + ", top=" + wint + ", " +

"location=no, menubar=no, resizable=no, " +

"scrollbars=no, titlebar=no, toolbar=no", true);

if (parseInt(navigator.appVersion) >= 4) { popup.window.focus(); }

popup.resizeTo(w,h);

}


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


"Albano Alves" <albanoalves@iol.pt> escreveu na mensagem
news:OilOlJoxEHA.1564@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button