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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POP UP WINDOWS NOT CENTERED!! 1

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Hello all --

I have an application that opens up a popup window, and when I try it on this one computer, the window(s) come up way on the left of the screen.

You can barely even see the right side enough to drag it back over into the middle of the screen.

Can anyone suggest to me a way to center the window when it pops up???

Thanks in advance...
Paul Prewett
 
in IE, you can use

var x = window.open('', '', 'height=200,width=200');
x.moveTo((screen.width/2 - 100), (screen.height/2 - 100));

netscape doesn't support screen.height or width, but i know they do have a way to get it, so you can use those for your calculations in Ns. luciddream@subdimension.com
 
And who cares about Netcape, anyway. ;-)

Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top