<?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: Eliminating redisplay flashes in JavaScript</title>
	<atom:link href="http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: BarelyBlogging &#187; Blog Archive &#187; Eliminating redisplay flashes in JavaScript</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4625</link>
		<dc:creator>BarelyBlogging &#187; Blog Archive &#187; Eliminating redisplay flashes in JavaScript</dc:creator>
		<pubDate>Tue, 14 Mar 2006 05:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4625</guid>
		<description>[...] Welcome, Ajaxians! [...]</description>
		<content:encoded><![CDATA[<p>[...] Welcome, Ajaxians! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kae Verens</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4537</link>
		<dc:creator>Kae Verens</dc:creator>
		<pubDate>Sun, 12 Mar 2006 10:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4537</guid>
		<description>I&#039;ve used something similar in the past, except hiding the entire page instead of a specific class. For example, my Borders demo, http://verens.com/demos/borders/test.html, redraws the borders of classes where the CSS demands curves. To reduce flicker, the script hides the entire page upon activation (see in the init() function), then shows the page when it is complete.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used something similar in the past, except hiding the entire page instead of a specific class. For example, my Borders demo, <a href="http://verens.com/demos/borders/test.html" rel="nofollow">http://verens.com/demos/borders/test.html</a>, redraws the borders of classes where the CSS demands curves. To reduce flicker, the script hides the entire page upon activation (see in the init() function), then shows the page when it is complete.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Fitzgerald</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4534</link>
		<dc:creator>Patrick Fitzgerald</dc:creator>
		<pubDate>Sun, 12 Mar 2006 03:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4534</guid>
		<description>Regarding the &quot;alternate stylesheet&quot; method, it&#039;s unreliable since the browser loads the external stylesheet.

Another technique I tried is to hide the content, but then use a NOSCRIPT element to display it. Unfortunately NOSCRIPT cannot be used in the HEAD element, so it&#039;s not valid code, but it does work.</description>
		<content:encoded><![CDATA[<p>Regarding the &#8220;alternate stylesheet&#8221; method, it&#8217;s unreliable since the browser loads the external stylesheet.</p>
<p>Another technique I tried is to hide the content, but then use a NOSCRIPT element to display it. Unfortunately NOSCRIPT cannot be used in the HEAD element, so it&#8217;s not valid code, but it does work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Fitzgerald</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4446</link>
		<dc:creator>Patrick Fitzgerald</dc:creator>
		<pubDate>Fri, 10 Mar 2006 05:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4446</guid>
		<description>How about creating an external stylesheet that defines &lt;code&gt;.javascript-hide-me { display:none; }&lt;/code&gt;, but link to it as an alternate stylesheet so it won&#039;t be applied by default.

Then use JavaScript to change it from &quot;alternate stylesheet&quot; to &quot;stylesheet&quot;, so it will be applied.

I tried it &lt;a href=&quot;http://www.barelyfitz.com/projects/flashing-javascript/no-flashing2.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; and it works in Firefox and IE6 on Windows.</description>
		<content:encoded><![CDATA[<p>How about creating an external stylesheet that defines <code>.javascript-hide-me { display:none; }</code>, but link to it as an alternate stylesheet so it won&#8217;t be applied by default.</p>
<p>Then use JavaScript to change it from &#8220;alternate stylesheet&#8221; to &#8220;stylesheet&#8221;, so it will be applied.</p>
<p>I tried it <a href="http://www.barelyfitz.com/projects/flashing-javascript/no-flashing2.html" rel="nofollow">here</a> and it works in Firefox and IE6 on Windows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Fitzgerald</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4442</link>
		<dc:creator>Patrick Fitzgerald</dc:creator>
		<pubDate>Fri, 10 Mar 2006 04:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4442</guid>
		<description>@bobby and Stephen: thanks for the comments - I have added your information and links to my original post.</description>
		<content:encoded><![CDATA[<p>@bobby and Stephen: thanks for the comments &#8211; I have added your information and links to my original post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Clay</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4439</link>
		<dc:creator>Stephen Clay</dc:creator>
		<pubDate>Fri, 10 Mar 2006 02:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4439</guid>
		<description>Bobby&#039;s is very well thought-out, but I prefer the simplicity of Patrick&#039;s technique, especially because you don&#039;t have to load a whole library of functions that slows page loading even more! XHTML and serving as XML is overrated anyway IMO.

I would only add a check for DOM compatibility before document.write-ing in the STYLE block: &lt;code&gt;if (typeof document.getElementsByTagName != &quot;undefined&quot;) {document.write...}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Bobby&#8217;s is very well thought-out, but I prefer the simplicity of Patrick&#8217;s technique, especially because you don&#8217;t have to load a whole library of functions that slows page loading even more! XHTML and serving as XML is overrated anyway IMO.</p>
<p>I would only add a check for DOM compatibility before document.write-ing in the STYLE block: <code>if (typeof document.getElementsByTagName != "undefined") {document.write...}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bobby</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4431</link>
		<dc:creator>bobby</dc:creator>
		<pubDate>Thu, 09 Mar 2006 22:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4431</guid>
		<description>Maybe this will come in handy: http://www.bobbyvandersluis.com/articles/dynamicCSS.php</description>
		<content:encoded><![CDATA[<p>Maybe this will come in handy: <a href="http://www.bobbyvandersluis.com/articles/dynamicCSS.php" rel="nofollow">http://www.bobbyvandersluis.com/articles/dynamicCSS.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neville Burnell</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4430</link>
		<dc:creator>Neville Burnell</dc:creator>
		<pubDate>Thu, 09 Mar 2006 21:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4430</guid>
		<description>(oops, hit submit too soon ... to continue)

So this post helps because my approach doesnt handle the &quot;javascript disabled&quot; problem - thanks.</description>
		<content:encoded><![CDATA[<p>(oops, hit submit too soon &#8230; to continue)</p>
<p>So this post helps because my approach doesnt handle the &#8220;javascript disabled&#8221; problem &#8211; thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neville Burnell</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4429</link>
		<dc:creator>Neville Burnell</dc:creator>
		<pubDate>Thu, 09 Mar 2006 21:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4429</guid>
		<description>I handled this issue in a similar way ... I added &quot;display:none&quot; to the style of the &quot;tabber div&quot; to hide it during the manipulation, then used prototypes Element.show() to display it when done.</description>
		<content:encoded><![CDATA[<p>I handled this issue in a similar way &#8230; I added &#8220;display:none&#8221; to the style of the &#8220;tabber div&#8221; to hide it during the manipulation, then used prototypes Element.show() to display it when done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Brooks</title>
		<link>http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript/comment-page-1#comment-4424</link>
		<dc:creator>Ryan Brooks</dc:creator>
		<pubDate>Thu, 09 Mar 2006 18:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript#comment-4424</guid>
		<description>Instead of using document.write to add the CSS, I would have taken it a little bit further... and of course, used the DOM.

&lt;code&gt;js = document.createElement(&#039;style&#039;);
js.appendChild(document.createTextNode(&#039;.javascript-hide-me{display:none;}&#039;));
js.type = &#039;text/css&#039;;
document.getElementsByTagName(&#039;head&#039;).item(0).appendChild(js);&lt;/code&gt;

-Ryan</description>
		<content:encoded><![CDATA[<p>Instead of using document.write to add the CSS, I would have taken it a little bit further&#8230; and of course, used the DOM.</p>
<p><code>js = document.createElement('style');<br />
js.appendChild(document.createTextNode('.javascript-hide-me{display:none;}'));<br />
js.type = 'text/css';<br />
document.getElementsByTagName('head').item(0).appendChild(js);</code></p>
<p>-Ryan</p>
]]></content:encoded>
	</item>
</channel>
</rss>

