Resizing IE window when page is opened

Posted by: Roger

Resizing IE window when page is opened - 01/12/2003 13:00

I've got a preferred size for my browser window (just large enough to view my links.xml file). Various sites force my browser window to full screen (as distinct from maximized). The worst offender is the configuration page for my router.

I'd like to fix it, and the easiest option would seem to be putting some JScript on my home page to resize the window to something sane each time I start IE.

Anyone got some simple code that'll do this?
Posted by: ricin

Re: Resizing IE window when page is opened - 01/12/2003 13:42

If you don't want anything fancy, and just want to set the outer window size, you can just use "window.resizeTo(W, H);" in the onLoad for <BODY>.
Posted by: Roger

Re: Resizing IE window when page is opened - 02/12/2003 02:26

Thanks. I'll try that later.
Posted by: tracerbullet

Re: Resizing IE window when page is opened - 02/12/2003 18:19

I *think* IE will remember the size of the last window open. I watch for the same, but in reverse. If I site opens a new window, and it's smaller than full screen, I make sure to close it first, and the full screen last.

There must be a better way... I like the suggestion above.
Posted by: Roger

Re: Resizing IE window when page is opened - 06/01/2004 16:18

Finally got around to trying that, and it works fine thanks. There was one minor wrinkle: since my homepage is generated from XML using XSLT, I had to hack on the .xsl file, but otherwise it works fine.

I might need to do something a bit cleverer to make sure that it works in browsers other than IE.