You should use the dimensions plugin [1] to handle this since it provides a cross browser method of getting the innerHeight.
... y = $(window).innerHeight(); ... [1]: http://jquery.com/dev/svn/trunk/plugins/dimensions/dimensions.js?format=txt -- Brandon Aaron On 1/19/07, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote: > Hi there, > > I am atm trying to let my js code automagically adjust an iframes height > on window resize. Now I got the following: > > $(window).resize( function() { > var y = window.innerHeight - 100; > $(#myIFrame).attr("height", y); > }); > > > Within firefox it works like a charme, but for IE i need an other > attribute. So I tried to avoid a browser check by using > > $(window).resize( function() { > y = $(document).attr("height"); // changed only this one > $(#myIFrame).attr("height", y); > }); > > which works too... in some way. But it returns the height from _before_ > resizing the window and not _after_ resizing it. Any hints on how I > could correct this? I already tried to put another $(document).ready() > into my resize listener, but this doesn't seem to work... > > Cheers, > > Arne > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/