<?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: Solved: IE event &#8211; &#8220;this.parentNode.parentNode is null or not an object&#8221;</title>
	<atom:link href="http://nerd.steveferson.com/2008/08/09/solved-ie-event-thisparentnodeparentnode-is-null-or-not-an-object/feed/" rel="self" type="application/rss+xml" />
	<link>http://nerd.steveferson.com/2008/08/09/solved-ie-event-thisparentnodeparentnode-is-null-or-not-an-object/</link>
	<description>One nerd's struggle against the beast that is technology</description>
	<lastBuildDate>Wed, 10 Mar 2010 11:07:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Simon O</title>
		<link>http://nerd.steveferson.com/2008/08/09/solved-ie-event-thisparentnodeparentnode-is-null-or-not-an-object/comment-page-1/#comment-34287</link>
		<dc:creator>Simon O</dc:creator>
		<pubDate>Fri, 13 Nov 2009 00:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.steveferson.com/?p=122#comment-34287</guid>
		<description>Hi Guys, 

How do I actually use this workaround to get the example you gave working?

this.parentNode.parentNode.removeChild(this.parentNode);</description>
		<content:encoded><![CDATA[<p>Hi Guys, </p>
<p>How do I actually use this workaround to get the example you gave working?</p>
<p>this.parentNode.parentNode.removeChild(this.parentNode);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nerd.</title>
		<link>http://nerd.steveferson.com/2008/08/09/solved-ie-event-thisparentnodeparentnode-is-null-or-not-an-object/comment-page-1/#comment-19680</link>
		<dc:creator>nerd.</dc:creator>
		<pubDate>Sat, 23 Aug 2008 17:47:35 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.steveferson.com/?p=122#comment-19680</guid>
		<description>Thanks for that sstchur, I&#039;ll look into it. But frankly I&#039;m a bit pissed off at the way Microsoft are dicking about here. I&#039;d prefer to limit the amount of external code in my projects but it&#039;s good to know if a client really wants IE support for that feature they can have it.</description>
		<content:encoded><![CDATA[<p>Thanks for that sstchur, I&#8217;ll look into it. But frankly I&#8217;m a bit pissed off at the way Microsoft are dicking about here. I&#8217;d prefer to limit the amount of external code in my projects but it&#8217;s good to know if a client really wants IE support for that feature they can have it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Stchur</title>
		<link>http://nerd.steveferson.com/2008/08/09/solved-ie-event-thisparentnodeparentnode-is-null-or-not-an-object/comment-page-1/#comment-19496</link>
		<dc:creator>Stephen Stchur</dc:creator>
		<pubDate>Wed, 20 Aug 2008 06:28:51 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.steveferson.com/?p=122#comment-19496</guid>
		<description>If you want a simplified version of the code from my blog that you refer to, try the following:

function addEvent(elem, evt, handler)
{
   if (typeof elem.addEventListener !== &#039;undefined&#039;)
   {
      elem.addEventListener(evt, handler, false);
   }
   else if (typeof elem.attachEvent !== &#039;undefined&#039;)
   {
      var proxy = function() { handler.call(elem); };
      elem.attachEvent(&#039;on&#039; + evt, proxy);
   }
}

Bear in mind though, that this will make it impossible to detach the event in IE (that may not matter to you).

Another option is to use a cross-browser addEvent function from some javascript library.  The Gimme Javascript Libaray (http://codelpex.com/gimme), for example, lets you take any DOM element and do:

g(myDomElem).addEvent(&#039;click&#039;, someHandler);    // works in all browsers

Hope this helps!
-sstchur</description>
		<content:encoded><![CDATA[<p>If you want a simplified version of the code from my blog that you refer to, try the following:</p>
<p>function addEvent(elem, evt, handler)<br />
{<br />
   if (typeof elem.addEventListener !== &#8216;undefined&#8217;)<br />
   {<br />
      elem.addEventListener(evt, handler, false);<br />
   }<br />
   else if (typeof elem.attachEvent !== &#8216;undefined&#8217;)<br />
   {<br />
      var proxy = function() { handler.call(elem); };<br />
      elem.attachEvent(&#8216;on&#8217; + evt, proxy);<br />
   }<br />
}</p>
<p>Bear in mind though, that this will make it impossible to detach the event in IE (that may not matter to you).</p>
<p>Another option is to use a cross-browser addEvent function from some javascript library.  The Gimme Javascript Libaray (<a href="http://codelpex.com/gimme" rel="nofollow">http://codelpex.com/gimme</a>), for example, lets you take any DOM element and do:</p>
<p>g(myDomElem).addEvent(&#8216;click&#8217;, someHandler);    // works in all browsers</p>
<p>Hope this helps!<br />
-sstchur</p>
]]></content:encoded>
	</item>
</channel>
</rss>
