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 Window Location

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
I know nothing about Javascripting, and I'm working with a page displaying this code

<a href=&quot;#&quot; OnClick=&quot;window.open ('file:///q:/online','me','toolbar=no,directories=no,status=no, scrollbar=yes, width=280,height=250')&quot; dynamicanimation=&quot;fpAnimformatRolloverFP1&quot; fprolloverstyle=&quot;color: #FFFFFF; font-weight: bold&quot; onmouseover=&quot;rollIn(this)&quot; onmouseout=&quot;rollOut(this)&quot; language=&quot;Javascript1.2&quot;><font color=&quot;#FFFFFF&quot; size=&quot;3&quot;>Forms</font></a>

How can I make this pop-up window pop-up in the center of the screen???
QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
I had that same question not long ago, and here is what luciddream had to say about it:

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.


Actually, I **think** that netscape's properties are called .innerheight and .innerwidth, but there's a full list of window properties and methods at:


and since that site is netscape, I would assume all of it would work with such

good luck! :)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top