Discussion Locked

AutoResize Web Window on Client Desktop

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know where to get the code (HTML, DHTML, JScript) which will automatically determine
the Users Screen Size and resize Web Pages.

3 replies

by jay eckles

Getting the user's screen size is not very difficult:

Javascript (at least under IE and Netscape) has a Screen object with width and height properties - screen.width, screen.height. See http://developer.irt.org/script/screen.htm for more details.

Resizing web pages is another matter. If you want to resize the window, one way to go is open a new window to the correct size and close the old window. If you actually want to re-layout the page according to the screen size (say you're attempting to provide good layout for a variety of resolutions), then the best bet is not to use scripting but rather intelligent HTML backed up with good CSS. It's a skill that takes time to develop, but the results are well worth it. I can't describe the process in a short response like this.

Good luck.

Jay Eckles

This discussion is closed to new replies.