Loic Le Guilly

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromLoic Le Guilly
ToMe
Subjectsetting the width of a browser window in IE6
Date22 July 2004 02:48
Hi Mark
 
Thanks for your great site.  Wonderful resource.
 
I have read with interest your article about getting the width/height of a
browser window.
 
I want to resize the width of a generic window.
I can't do it in IE6 because document.documentElement.clientWidth seems to
be read-only...
 
I have searched the web extensively but I can't figure out how to do it.
 
Any idea to work around it ?
 
Cheers
 
Loic Le Guilly
FromMe
ToLoic Le Guilly
SubjectRe: setting the width of a browser window in IE6
Date22 July 2004 08:18
Loic,

sure, resizing the browser window is done using the
window.resizeTo(width,height)
[or window.resizeBy(widthAdjust,heightAdjust)]
method. This resizes the outside of the window to the given size. Since
many authors want to resize the inside, I have written a script to do this
for both popups and regular windows:
http://www.howtocreate.co.uk/perfectPopups.html

Hope this helps


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromLoic Le Guilly
ToMe
SubjectRe: setting the width of a browser window in IE6
Date22 July 2004 08:38
Thanks Mark.
Amazing timing as I had just worked out a way to resize the width only !
(see fiurther down)
I borrowed some of your code, I hope you don't mind...

The funny thing though is that I run IE6 and it doesn't seem to go through
the part it's supposed to (by testing the document.documentElement)
Even by putting various DOCTYPES on my page, it always seem to go through
the 'IE 4 compatible' bit...

Anyway, it works.

Thanks again

Loic

[code using resizeBy]
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.