Well, window always know its actual size, just read it. You must be
wanted to ask "How to know if window was resized so to get hew width
and height?"
window host object has onresize event handler, so use it:
window.onresize = function() {
/* update values */
}
Note: there is a lost lasting peculiarity in NN and still in IE with
resize event being called twice each time: first time on resize end,
second time (optional) on window scrollbars display/removal if the new
area gets too small or too big. Doesn't happen if scrollbars are not
auto.
Sorry, I think my question statement was unclear.
Here's another attempt.
General Info:
I have a user interface page/form that has an iframe with id and name
of "datafrm" within it.
Current State:
using js to preset the iframe's width and height using style like
document.getElementById('datafrm').style.width = screen.width;
....
Goal:
Make the width and height of the iframe dynamic, that is about 90% of
the current browser's window height and width respectively.
This current window may be re-sized by a user any time. And when that
happens I'd like the the height and width of the iframe to reflect
that.
Browsers to be supported:
IE 7/8 and Firefox 3.5.x for now.
Thanks, VK.