<?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: When do DOM elements become available?</title>
	<atom:link href="http://ajaxian.com/archives/when-do-dom-elements-become-available/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/when-do-dom-elements-become-available</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: sandeep</title>
		<link>http://ajaxian.com/archives/when-do-dom-elements-become-available/comment-page-1#comment-17735</link>
		<dc:creator>sandeep</dc:creator>
		<pubDate>Wed, 31 May 2006 07:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=693#comment-17735</guid>
		<description>hello!
I am developing AJAX application
I am calling asp page onload through showdata() function from .js file which gets data through asp page and fills innerhtml of div
and again in that asp page am calling showdata() with defer attribute.
and fills another div. It is working fine in IE but not in mozilla.

flow is like this main.html -&gt;sub1.asp-sub2.asp but boths asp page&#039;s result i want in main html.

sandeep</description>
		<content:encoded><![CDATA[<p>hello!<br />
I am developing AJAX application<br />
I am calling asp page onload through showdata() function from .js file which gets data through asp page and fills innerhtml of div<br />
and again in that asp page am calling showdata() with defer attribute.<br />
and fills another div. It is working fine in IE but not in mozilla.</p>
<p>flow is like this main.html -&gt;sub1.asp-sub2.asp but boths asp page&#8217;s result i want in main html.</p>
<p>sandeep</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Project :: penkiblog &#187; Blog Archive &#187; æœ¬æ—¥æ›¸ç±¤</title>
		<link>http://ajaxian.com/archives/when-do-dom-elements-become-available/comment-page-1#comment-2227</link>
		<dc:creator>Project :: penkiblog &#187; Blog Archive &#187; æœ¬æ—¥æ›¸ç±¤</dc:creator>
		<pubDate>Wed, 04 Jan 2006 20:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=693#comment-2227</guid>
		<description>[...] http://ajaxian.com/archives/when-do-dom-elements-become-available [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://ajaxian.com/archives/when-do-dom-elements-become-available" rel="nofollow">http://ajaxian.com/archives/when-do-dom-elements-become-available</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Schiller</title>
		<link>http://ajaxian.com/archives/when-do-dom-elements-become-available/comment-page-1#comment-2220</link>
		<dc:creator>Scott Schiller</dc:creator>
		<pubDate>Wed, 04 Jan 2006 16:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=693#comment-2220</guid>
		<description>Sorry, forgot I couldn&#039;t put any HTML in the posts. Should read, &quot;in a script block just before the close of the body tag.&quot;

Dean Edwards isn&#039;t a fan of inserting script calls in the document, but it&#039;s been the most reliable method for my own use.</description>
		<content:encoded><![CDATA[<p>Sorry, forgot I couldn&#8217;t put any HTML in the posts. Should read, &#8220;in a script block just before the close of the body tag.&#8221;</p>
<p>Dean Edwards isn&#8217;t a fan of inserting script calls in the document, but it&#8217;s been the most reliable method for my own use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Schiller</title>
		<link>http://ajaxian.com/archives/when-do-dom-elements-become-available/comment-page-1#comment-2219</link>
		<dc:creator>Scott Schiller</dc:creator>
		<pubDate>Wed, 04 Jan 2006 15:55:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=693#comment-2219</guid>
		<description>document.getElementById() appears to work if placed after the elements in question under IE, but in my opinion it&#039;s really best if this method is left until window.onload() before being called.

As Mark mentioned above, I&#039;ve found that using getElementsByTagName() works nicely (and cross-browser) before .onload if placed in a script block just before  - eg. getElementsByTagName(&#039;html&#039;)[0].getElementsByTagName(&#039;div&#039;)[1] - though it&#039;s harder to target an individual item as with getElementById. (A loop checking for a given class name or other attribute could be written, for example.)

To keep things clean, the script block can just be a one-line function call at this point; the important thing is the timing, ie. that the browser will have parsed and is aware of all other elements (minus  itself) by that time.</description>
		<content:encoded><![CDATA[<p>document.getElementById() appears to work if placed after the elements in question under IE, but in my opinion it&#8217;s really best if this method is left until window.onload() before being called.</p>
<p>As Mark mentioned above, I&#8217;ve found that using getElementsByTagName() works nicely (and cross-browser) before .onload if placed in a script block just before  &#8211; eg. getElementsByTagName(&#8216;html&#8217;)[0].getElementsByTagName(&#8216;div&#8217;)[1] &#8211; though it&#8217;s harder to target an individual item as with getElementById. (A loop checking for a given class name or other attribute could be written, for example.)</p>
<p>To keep things clean, the script block can just be a one-line function call at this point; the important thing is the timing, ie. that the browser will have parsed and is aware of all other elements (minus  itself) by that time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Kawakami</title>
		<link>http://ajaxian.com/archives/when-do-dom-elements-become-available/comment-page-1#comment-2215</link>
		<dc:creator>Mark Kawakami</dc:creator>
		<pubDate>Wed, 04 Jan 2006 09:11:02 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=693#comment-2215</guid>
		<description>I&#039;ve wondered the same thing, especially regarding whether it&#039;s possible to call &lt;code&gt;getElementById(&#039;foo&#039;)&lt;/code&gt; from within the &lt;div id=&quot;foo&quot;&gt;...&lt;/div&gt;. I did a little experimentation earlier which suggested that it is possible. It definitely appears to be possible to call &lt;code&gt;getElementsByTagName(&#039;html&#039;)&lt;/code&gt; from within the &amp;;t;head&gt; (and obviously before &lt;html&gt; is closed).</description>
		<content:encoded><![CDATA[<p>I&#8217;ve wondered the same thing, especially regarding whether it&#8217;s possible to call <code>getElementById('foo')</code> from within the &lt;div id=&#8221;foo&#8221;&gt;&#8230;&lt;/div&gt;. I did a little experimentation earlier which suggested that it is possible. It definitely appears to be possible to call <code>getElementsByTagName('html')</code> from within the &amp;;t;head&gt; (and obviously before &lt;html&gt; is closed).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

