PDA

View Full Version : Getting size of browser window....


Dr. Web
03-10-2002, 04:39 PM
Heres the deal, I'd like to redraw a page, based on the browser size, not resolution size.

For instance, I work with a screen at 1400, 1050 but I regularily view websites not at fullscreen... but at a reduced browser size. Id like to base my pages on the width of the browserwindow that is viewing the page. unfortunately, results are slim. Heres what I have so far running IE6:

screen.width returns available width of monitor screen.
window.innerWidth=undefined
window.outerWidth=undefined
the navigator and document objects dont seem to have width properties.

am I missing something, or is there no object reference which tells me what the width of the browser is?

As a workaround, I could base the pages off of rez, but I know that at past 1024x768 people tend to have tons of cascading pages, not open to the full screen.

Thanks for any input.

whkoh
03-10-2002, 08:57 PM
How about document.body.clientWidth and document.body.clientHeight for IE?

_mrkite
03-10-2002, 10:28 PM
http://www.faqts.com/knowledge_base/view.phtml/aid/1178/fid/124

Dr. Web
03-11-2002, 12:53 AM
thanks guys! you rock! :jamin: