<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: IE javascript bug is kicking my ass</title>
	<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass/</link>
	<description>Comments on Ask MetaFilter post IE javascript bug is kicking my ass</description>
	<pubDate>Thu, 19 Jun 2008 17:48:20 -0800</pubDate>
	<lastBuildDate>Thu, 19 Jun 2008 17:48:20 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: IE javascript bug is kicking my ass</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass</link>	
		<description>Javascript/CSS and IE6/7: content called from a javascript file (a modified form of &lt;a href=&quot;http://test.unintentionallyblank.co.uk/fontSizer.js&quot;&gt;fontSizer&lt;/a&gt;) into an otherwise blank div appears and disappears intermittently in IE6/7. Help a newbie! &lt;br /&gt;&lt;br /&gt; I know enough Javascript to just squeak by, but this bug is bugging the hell out of me. The content written from a .js file (images and text) appears every time in Firefox but only sometimes in IE6/7. Sometimes a page reload will reveal it, sometimes returning to the page from another page on the site will reveal it.&lt;br&gt;
&lt;br&gt;
My first guess was the peekaboo bug, but none of the fixes work and if I disable the pages&apos; css the content still appears/disappears the same way.&lt;br&gt;
&lt;br&gt;
The pages in question are still in development (i.e. not live), so MeFi Mail me for a URL.&lt;br&gt;
&lt;br&gt;
Any ideas or suggestions on how to debug this are gratefully welcomed!</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.94528</guid>
		<pubDate>Thu, 19 Jun 2008 16:06:40 -0800</pubDate>
		<dc:creator>Paragon</dc:creator>
		
			<category>javascript</category>
		
			<category>css</category>
		
			<category>bugs</category>
		
			<category>ie6</category>
		
			<category>ie7</category>
		
			<category>internetexplorer</category>
		
	</item> <item>
		<title>By: Pinback</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass#1381360</link>	
		<description>I&apos;ve seen this happen, but never did sort it out to my satisfaction. IIRC, it&apos;s due to an IE6 (&amp;amp; presumably 7) interaction between DOM events and body events.&lt;br&gt;
&lt;br&gt;
Have you got multiple addDOMLoadEvent calls (i.e. calling the same or different functions several times for different DOM objects)? Does it work when you call the function from a &amp;lt;body onLoad=&quot;...&quot;&amp;gt; event?&lt;br&gt;
&lt;br&gt;
&lt;small&gt;(I&apos;m off to uni - yay, exams! - so someone else will have to help further.)&lt;/small&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.94528-1381360</guid>
		<pubDate>Thu, 19 Jun 2008 17:48:20 -0800</pubDate>
		<dc:creator>Pinback</dc:creator>
	</item><item>
		<title>By: Paragon</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass#1381420</link>	
		<description>There was an addDOMLoadEvent call for that function in the .js file, so I moved it to a body onLoad and it worked nicely! It did, however, shut off another function - which was using an addEvent(window, &apos;load&apos;) call - so I moved that into the body onLoad as well.&lt;br&gt;
&lt;br&gt;
Short term solution, thank you Pinback! Long term solution, do I need to put every onLoad event into the body tag directly, and call none of them via other means? I don&apos;t really want to play what-event-has-been-shut-down tag with IE. Does this bug have a name - is there a summary somewhere online for it?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.94528-1381420</guid>
		<pubDate>Thu, 19 Jun 2008 18:39:48 -0800</pubDate>
		<dc:creator>Paragon</dc:creator>
	</item><item>
		<title>By: moift</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass#1381601</link>	
		<description>I haven&apos;t run into this particular problem, but I know IE treats elements added by DOM differently than elements with other sources, and to overcome some bugs you can force it to re-evaluate a section of the document by touching it with the &quot;HTML-mode&quot; methods.&lt;br&gt;
&lt;br&gt;
So, if adding some_dom_el is causing problems, try, after appending everything with DOM,&lt;br&gt;
&lt;br&gt;
some_dom_el.parentNode.innnerHTML += &apos;&apos;;&lt;br&gt;
&lt;br&gt;
It seems completely stupid, but I&apos;ve seen this miraculously fix a bunch of IE6 quirks.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.94528-1381601</guid>
		<pubDate>Thu, 19 Jun 2008 22:31:03 -0800</pubDate>
		<dc:creator>moift</dc:creator>
	</item><item>
		<title>By: moift</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass#1381603</link>	
		<description>Oops, I meant innerHTML there.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.94528-1381603</guid>
		<pubDate>Thu, 19 Jun 2008 22:32:11 -0800</pubDate>
		<dc:creator>moift</dc:creator>
	</item><item>
		<title>By: Pinback</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass#1382298</link>	
		<description>Well, like I said when I encountered it I never did sort it out to my satisfaction...&lt;br&gt;
&lt;br&gt;
Without knowing all the details of the different events your trying to trap, the event handler functions you&apos;re calling, and at what point they&apos;re being called, I can&apos;t really add any more except to say that your other addEvent(window, &apos;load&apos;) is exactly the same as &amp;lt;body onLoad(...)&amp;gt; when you&apos;re not using frames - but it seems the body version takes precedence &amp;amp; can&apos;t be replaced/stacked if it exists.&lt;br&gt;
&lt;br&gt;
It was 6~7 years ago, about the time IE6 was released, that I encountered this - which also BTW pretty much predates people giving names to DOM &amp;amp; CSS bugs/workarounds - so sorry, no, I don&apos;t remember any links to summaries, explanations, or workarounds. IE compatability was/is very much a distant second concern for me so I tend to just give up, make sure it works in FF, and exclude any DOM manipulation fanciness from IE altogether.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.94528-1382298</guid>
		<pubDate>Fri, 20 Jun 2008 17:10:44 -0800</pubDate>
		<dc:creator>Pinback</dc:creator>
	</item><item>
		<title>By: Paragon</title>
		<link>http://ask.metafilter.com/94528/IE-javascript-bug-is-kicking-my-ass#1382356</link>	
		<description>Thanks very much for your help, guys. I guess I was plugging too much external code in without seeing whether they would conflict with each other somehow. &lt;br&gt;
&lt;br&gt;
Also, I hope your exam went well!</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.94528-1382356</guid>
		<pubDate>Fri, 20 Jun 2008 19:22:12 -0800</pubDate>
		<dc:creator>Paragon</dc:creator>
	</item>
	</channel>
</rss>
