<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Beating the IE Resize Bug</title>
	<atom:link href="http://blog.stchur.com/2006/08/20/beating-the-ie-resize-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stchur.com/2006/08/20/beating-the-ie-resize-bug/</link>
	<description>web / programming / javascript / css / html</description>
	<lastBuildDate>Tue, 29 Jun 2010 15:30:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Pedro</title>
		<link>http://blog.stchur.com/2006/08/20/beating-the-ie-resize-bug/comment-page-1/#comment-13957</link>
		<dc:creator>Pedro</dc:creator>
		<pubDate>Wed, 13 May 2009 14:44:56 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2006/08/20/beating-the-ie-resize-bug/#comment-13957</guid>
		<description>Simple but effective solution:

function countViewport(){
winHeight = $(window).height();
winWidth = $(window).width();
}

$(window).bind(&#039;resize&#039;, function(){
  if ($(window).height() != winHeight
  &#124;&#124; $(window).width() != winWidth) {
     countViewport();
     // TODO here
  }
});</description>
		<content:encoded><![CDATA[<p>Simple but effective solution:</p>
<p>function countViewport(){<br />
winHeight = $(window).height();<br />
winWidth = $(window).width();<br />
}</p>
<p>$(window).bind(&#039;resize&#039;, function(){<br />
  if ($(window).height() != winHeight<br />
  || $(window).width() != winWidth) {<br />
     countViewport();<br />
     // TODO here<br />
  }<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wilfried Nauta</title>
		<link>http://blog.stchur.com/2006/08/20/beating-the-ie-resize-bug/comment-page-1/#comment-4026</link>
		<dc:creator>Wilfried Nauta</dc:creator>
		<pubDate>Wed, 08 Oct 2008 09:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2006/08/20/beating-the-ie-resize-bug/#comment-4026</guid>
		<description>Dear Sir,

Thanks to your efforts I finally understand the cause of this problem. 

However, this piece of Javascript will work fine too in most cases:

var wheight = 0;
var temp_height = 0;
var delay = 100;

function init(){
if(self.innerHeight)temp_height = self.innerHeight; //all except Explorer
else if(document.documentElement &amp;&amp; document.documentElement.clientHeight)temp_height = document.documentElement.clientHeight; // Explorer 6 Strict Mode
else if(document.body)temp_height = document.body.clientHeight;// other Explorers
else temp_height = 430;
if(temp_height!=height)dosomething();
wheight = temp_height;
setTimeout(&#039;init()&#039;,delay);
}

window.onload = init;

Best regards, WN</description>
		<content:encoded><![CDATA[<p>Dear Sir,</p>
<p>Thanks to your efforts I finally understand the cause of this problem. </p>
<p>However, this piece of Javascript will work fine too in most cases:</p>
<p>var wheight = 0;<br />
var temp_height = 0;<br />
var delay = 100;</p>
<p>function init(){<br />
if(self.innerHeight)temp_height = self.innerHeight; //all except Explorer<br />
else if(document.documentElement &amp;&amp; document.documentElement.clientHeight)temp_height = document.documentElement.clientHeight; // Explorer 6 Strict Mode<br />
else if(document.body)temp_height = document.body.clientHeight;// other Explorers<br />
else temp_height = 430;<br />
if(temp_height!=height)dosomething();<br />
wheight = temp_height;<br />
setTimeout(&#039;init()&#039;,delay);<br />
}</p>
<p>window.onload = init;</p>
<p>Best regards, WN</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Stchur</title>
		<link>http://blog.stchur.com/2006/08/20/beating-the-ie-resize-bug/comment-page-1/#comment-11</link>
		<dc:creator>Stephen Stchur</dc:creator>
		<pubDate>Sat, 20 Jan 2007 13:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2006/08/20/beating-the-ie-resize-bug/#comment-11</guid>
		<description>Kai:

Double check to be sure you&#039;re using the updated technique, which can be found here: &lt;a href = &quot;http://blog.stchur.com/2006/09/06/the-ie-resize-bug-revisited/&quot; rel=&quot;nofollow&quot;&gt;The IE Resize Bug (Revisited)&lt;/a&gt;.  That blog post utilizes a better technique which I discovered &lt;em&gt;after&lt;/em&gt; I posted this blog entry.

To the best of my knowledge, the newer technique works in all cases.</description>
		<content:encoded><![CDATA[<p>Kai:</p>
<p>Double check to be sure you&#039;re using the updated technique, which can be found here: <a href = "http://blog.stchur.com/2006/09/06/the-ie-resize-bug-revisited/" rel="nofollow">The IE Resize Bug (Revisited)</a>.  That blog post utilizes a better technique which I discovered <em>after</em> I posted this blog entry.</p>
<p>To the best of my knowledge, the newer technique works in all cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kai</title>
		<link>http://blog.stchur.com/2006/08/20/beating-the-ie-resize-bug/comment-page-1/#comment-12</link>
		<dc:creator>Kai</dc:creator>
		<pubDate>Sat, 20 Jan 2007 05:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2006/08/20/beating-the-ie-resize-bug/#comment-12</guid>
		<description>Works great horizontally, but if I want to fit a div vertically in the browser window with no scrolling, this doesn&#039;t quite work.  I resorted to adding another condition in the doResize function, comparing the document clientHeight to scrollHeight and resize my div if the absolute &gt; 20.  20 because apparently there is some natural difference between the two even if there is no scrolling.  It makes it jumpy (not great), but it works.</description>
		<content:encoded><![CDATA[<p>Works great horizontally, but if I want to fit a div vertically in the browser window with no scrolling, this doesn&#039;t quite work.  I resorted to adding another condition in the doResize function, comparing the document clientHeight to scrollHeight and resize my div if the absolute &gt; 20.  20 because apparently there is some natural difference between the two even if there is no scrolling.  It makes it jumpy (not great), but it works.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
