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

Newbie - How to configure a default window size

Status
Not open for further replies.

burton

Technical User
May 28, 2002
3
TR
Hi,

I'm writing my first web page. And would like to set the default size for the window. I'm not sure if I can use html or will need a javascript. At the moment it will only contain 2 images. Both less than 800 width.

So I would like fix the window size at say 500 x 500. For use by both IE and Netscape. Is this possible, if so could somebody please advise.

Many thanks

Burton
 
What do you mean by "default" size?
You of cause can do the following:
Code:
<script language=&quot;javascript&quot;>
function resizeMe()
{
  if((window.outerHeight!=500)||(window.outerWidth!=500))
    window.resizeTo(500,500);
}
</script>
<body onload=&quot;resizeMe()&quot;>
and it will work in both browsers (version >=4). But I can predict that you visitors will be very upset.
 
Michael,

I have just put this code into a test page and it works - no surprise - but I also want to know the size of the window and use it, so I am trying to do alert(window.outerHeight); but I am getting undefined.

Do you know why this is happening??

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top