irt.org FAQ Knowledge Base Q240
Kalin Agrawal on May 17, 2000 at 16:11:55:
Very worth reading
I've found a hacky way to get around the IE resize discrepancy:
to_set_W = 300;
to_set_H = 200;
w = document.body.clientWidth;
h = document.body.clientHeight;
offW = to_set_W - w;
offH = to_set_H - h;
IE's clientWidth and clientHeight properties are read-only; the only way to change size is through resizeTo() and resizeBy(). The hack involves reading the current clientWidth and clientHeight and then figuring out by how much it is wrong and then resize accordingly, fixing the difference.
The result is that the clientHeight and clientWidth are adjusted to be the desired dimensions, good for framing known dimensions (e.g. an image), without worrying about the window's decorations (such as menus, toobars etc.).
Other feedback on 'irt.org FAQ Knowledge Base Q240' - show all