Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open a new window at the top left corner on the screen in IE?

Status
Not open for further replies.

sreeky

Programmer
Aug 8, 2001
77
US
I know Netscape works using screenX=0,screenY=0, but IE doesn't. Is there a way around?

Thanks!!
Sreeky
 
function newWin(url,nwidth,nheight)
{
if (nwidth == null) {
nwidth = 440;
}

if (nheight == null) {
nheight = 300;
}

screenx = (screen.availWidth - nwidth) / 2;
screeny = (screen.availHeight - nheight) / 2;
var hWnd = window.open(url,"winLOV","toolbar=no,width="+nwidth+",height="+nheight+",left="+screenx+",top="+screeny+",resizable=0,scrollbars=yes,menubar=no,directories=no
var hWnd = window.open(url,"winLOV","toolbar=no,width="+nwidth+",height="+nheight+",left="+screenx+",top="+screeny+",resizable=0,scrollbars=yes,menubar=no,directories=no");
hWnd.focus();
}

Also you need to call the function with the window size and other stuffs like,
JavaScript:newWin("abc.jsp",600,375)

Enjoy all the Best

Baski.

 
wnd=window.open(blahblah)
wnd.moveTo(0,0) regards, vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top