<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tequila Fish &#187; Dojo</title>
	<atom:link href="http://www.tequilafish.com/category/tech/programming/javascript/dojo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tequilafish.com</link>
	<description>Ran-dumb ramblings of me...</description>
	<lastBuildDate>Wed, 28 Jul 2010 02:58:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dojo: How to get the ID of an element.</title>
		<link>http://www.tequilafish.com/2009/06/18/dojo-how-to-get-the-id-of-an-element/</link>
		<comments>http://www.tequilafish.com/2009/06/18/dojo-how-to-get-the-id-of-an-element/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 04:12:55 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[dojo javascript id]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=312</guid>
		<description><![CDATA[To get the ID of an element using Dojo Framework, you need to use the dojo.attr function. Given the following HTML: &#60;img src=&#34;/path/to/imageA.jpg&#34; id=&#34;myImage1&#34; /&#62; &#60;img src=&#34;/path/to/imageB.jpg&#34; id=&#34;myImage2&#34; /&#62; &#60;img src=&#34;/path/to/imageC.jpg&#34; id=&#34;myImage3&#34; /&#62; You can get the IDs of each image in Dojo like so: dojo.query(&#34;img&#34;).forEach(function(currentNode) { &#160;&#160;&#160;&#160;var theElementId = dojo.attr(currentNode, &#34;id&#34;); &#160;&#160;&#160;&#160;console.log(&#34;id: &#34;, theElementId); [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F06%2F18%2Fdojo-how-to-get-the-id-of-an-element%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F06%2F18%2Fdojo-how-to-get-the-id-of-an-element%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>To get the ID of an element using Dojo Framework, you need to use the <strong>dojo.attr</strong> function.</p>
<p>Given the following HTML:</p>
<p><code>&lt;img src=&quot;/path/to/imageA.jpg&quot; id=&quot;myImage1&quot; /&gt;<br />
&lt;img src=&quot;/path/to/imageB.jpg&quot; id=&quot;myImage2&quot; /&gt;<br />
&lt;img src=&quot;/path/to/imageC.jpg&quot; id=&quot;myImage3&quot; /&gt;</code></p>
<p>You can get the IDs of each image in Dojo like so:</p>
<p><code>dojo.query(&quot;img&quot;).forEach(function(currentNode) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var theElementId = <strong>dojo.attr(currentNode, &quot;id&quot;)</strong>;<br />
&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;id: &quot;, theElementId); // debug<br />
});</code></p>
<p>If you have debugging on and something like Firebug, the console output would be like so:</p>
<p><code>id: myImage1<br />
id: myImage2<br />
id: myImage3</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/06/18/dojo-how-to-get-the-id-of-an-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
