<?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: Taking advantage of DOM on ready and Event observers using Prototype.js</title>
	<atom:link href="http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/</link>
	<description>Rich Internet Application development</description>
	<lastBuildDate>Fri, 13 Aug 2010 11:36:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-50114</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Mon, 12 May 2008 22:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-50114</guid>
		<description>@Patrov - Are you saying that once you load content (from an a href) using Ajax then Prototype can&#039;t &quot;see&quot; your links?

If so then yes...this will happen because your main page hasn&#039;t registered this new content in the DOM.

Typically what I do is add an Event.observe() in the actual content which is returned by Ajax.

Hope that helps</description>
		<content:encoded><![CDATA[<p>@Patrov &#8211; Are you saying that once you load content (from an a href) using Ajax then Prototype can&#8217;t &#8220;see&#8221; your links?</p>
<p>If so then yes&#8230;this will happen because your main page hasn&#8217;t registered this new content in the DOM.</p>
<p>Typically what I do is add an Event.observe() in the actual content which is returned by Ajax.</p>
<p>Hope that helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrov</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-50081</link>
		<dc:creator>Patrov</dc:creator>
		<pubDate>Mon, 12 May 2008 19:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-50081</guid>
		<description>Hi many thanks for this post.
I hava a issue with the Event.observe(window, â€˜loadâ€™, myFunction).
I&#039;m using two pages.

The first one has a remote link to the second with contents my &quot;event observers&quot;. The problem is after the loading of the second page my eventHandlers doesn&#039;t work anymore.
It seems that prototype can&#039;t find the elements that are on my ajax page. (Sorry for my english)

Merci d&#039;avance pour votre aide.
Thanks for your help.</description>
		<content:encoded><![CDATA[<p>Hi many thanks for this post.<br />
I hava a issue with the Event.observe(window, â€˜loadâ€™, myFunction).<br />
I&#8217;m using two pages.</p>
<p>The first one has a remote link to the second with contents my &#8220;event observers&#8221;. The problem is after the loading of the second page my eventHandlers doesn&#8217;t work anymore.<br />
It seems that prototype can&#8217;t find the elements that are on my ajax page. (Sorry for my english)</p>
<p>Merci d&#8217;avance pour votre aide.<br />
Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chapter31 &#187; Blog Archive &#187; Showing and hiding elements with CSS and JavaScript</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-43447</link>
		<dc:creator>chapter31 &#187; Blog Archive &#187; Showing and hiding elements with CSS and JavaScript</dc:creator>
		<pubDate>Fri, 28 Mar 2008 17:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-43447</guid>
		<description>[...] a while (it&#8217;s just that I wanted to know if there was a cleaner solution in this case) is the dom:loaded observer function which will run as soon as the Dom is loaded (and before all &#8216;assets&#8217; are loaded so [...]</description>
		<content:encoded><![CDATA[<p>[...] a while (it&#8217;s just that I wanted to know if there was a cleaner solution in this case) is the dom:loaded observer function which will run as soon as the Dom is loaded (and before all &#8216;assets&#8217; are loaded so [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-35939</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Sat, 02 Feb 2008 04:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-35939</guid>
		<description>Ah my mistake on the Prototype side of things. I&#039;m well aware of the difference with jQuery&#039;s document ready.

After a quick search I found the correct syntax for the Prototype equivalent, either:

document.observe(&#039;dom:loaded&#039;, function(){

});

Or use this to call a function with your &#039;initialisation&#039; code:

Event.observe(document, &#039;dom:loaded&#039;, init); 

function init()
{
	//initialise code
}

Thanks for that, I&#039;ve updated the post</description>
		<content:encoded><![CDATA[<p>Ah my mistake on the Prototype side of things. I&#8217;m well aware of the difference with jQuery&#8217;s document ready.</p>
<p>After a quick search I found the correct syntax for the Prototype equivalent, either:</p>
<p>document.observe(&#8216;dom:loaded&#8217;, function(){</p>
<p>});</p>
<p>Or use this to call a function with your &#8216;initialisation&#8217; code:</p>
<p>Event.observe(document, &#8216;dom:loaded&#8217;, init); </p>
<p>function init()<br />
{<br />
	//initialise code<br />
}</p>
<p>Thanks for that, I&#8217;ve updated the post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr J</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-35741</link>
		<dc:creator>Dr J</dc:creator>
		<pubDate>Thu, 31 Jan 2008 16:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-35741</guid>
		<description>the window.load event is not the same thing as jQuery&#039;s ready event.

see the jQuery documentation for an explanation:

http://docs.jquery.com/How_jQuery_Works</description>
		<content:encoded><![CDATA[<p>the window.load event is not the same thing as jQuery&#8217;s ready event.</p>
<p>see the jQuery documentation for an explanation:</p>
<p><a href="http://docs.jquery.com/How_jQuery_Works" rel="nofollow">http://docs.jquery.com/How_jQuery_Works</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-35043</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Fri, 25 Jan 2008 09:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-35043</guid>
		<description>Agreed Michael. Thats would be the ideal scenario. Let me know if you ever do that:)</description>
		<content:encoded><![CDATA[<p>Agreed Michael. Thats would be the ideal scenario. Let me know if you ever do that:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-34966</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 24 Jan 2008 20:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-34966</guid>
		<description>@Anuj

Yeah I know what you mean, some of my old posts use another method and I have been too lazy to go and update the markup :(

I really want to find a way where I can just use a class on a div and let the JS do it that way. Then my markup will be free of all this stuff and it&#039;ll make it easy to update!

Hmm...that sounds like a project :)</description>
		<content:encoded><![CDATA[<p>@Anuj</p>
<p>Yeah I know what you mean, some of my old posts use another method and I have been too lazy to go and update the markup <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I really want to find a way where I can just use a class on a div and let the JS do it that way. Then my markup will be free of all this stuff and it&#8217;ll make it easy to update!</p>
<p>Hmm&#8230;that sounds like a project <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-34942</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Thu, 24 Jan 2008 16:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-34942</guid>
		<description>Got it working :)

http://www.anujgakhar.com/2008/01/23/different-ways-of-making-a-thread-sleep/

Its a pain to go and edit all my code to have to work with this though.</description>
		<content:encoded><![CDATA[<p>Got it working <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.anujgakhar.com/2008/01/23/different-ways-of-making-a-thread-sleep/" rel="nofollow">http://www.anujgakhar.com/2008/01/23/different-ways-of-making-a-thread-sleep/</a></p>
<p>Its a pain to go and edit all my code to have to work with this though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-34924</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 24 Jan 2008 11:30:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-34924</guid>
		<description>Thanks Anuj :)</description>
		<content:encoded><![CDATA[<p>Thanks Anuj <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/comment-page-1/#comment-34913</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Thu, 24 Jan 2008 10:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2008/01/23/taking-advantage-of-dom-on-ready-and-event-observers-using-prototypejs/#comment-34913</guid>
		<description>Thanks Michael, I will try it out. Nice blog, by the way.</description>
		<content:encoded><![CDATA[<p>Thanks Michael, I will try it out. Nice blog, by the way.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
