<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.netlobo.com/commentsrss.php?aid=10" rel="self" type="application/rss+xml" />
		<title>Comments on: Using Javascript to get an Element by ID</title>
		<description>A cross-browser alternative to the javascript getElementById function</description>
		<link>http://www.netlobo.com/comments/javascript_get_element_id</link>
		<language>en-us</language>
		<copyright>Copyright 2010, Netlobo.com</copyright>
		<lastBuildDate>Mon, 26 Apr 2010 17:10:54 GMT</lastBuildDate>
		<generator>Netlobo In-house RSS v1.4</generator>
		<item>
			<title>Rajneesh</title>
			<description>Thsnk for cool information .I love javascript.</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-545</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-545</guid>
			<pubDate>Mon, 26 Apr 2010 06:34:20 GMT</pubDate>
		</item>
		<item>
			<title>Sandy</title>
			<description>Hi i have a small problem.. I display few details fetching from the database. Now i want to populate those details into another page where i have the fields. can you plz guide me how do i go upon this..&lt;br /&gt;
Thanks in advance..</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-463</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-463</guid>
			<pubDate>Thu, 06 Aug 2009 08:08:57 GMT</pubDate>
		</item>
		<item>
			<title>Ofer</title>
			<description>Thanks, i always get the js functions wrong.&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://www.coffee-stories.com&amp;quot;&amp;gt;Ofer&amp;lt;/a&amp;gt;</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-388</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-388</guid>
			<pubDate>Tue, 13 Jan 2009 11:24:04 GMT</pubDate>
		</item>
		<item>
			<title>JustMe</title>
			<description>Even simpler (shorter):&lt;br /&gt;
&lt;pre&gt;
var d=document;
function o(id){
    return d.getElementById?d.getElementById(id):(d.all?d.all[id]:(d.layers?d.layers[id]:null));
}
&lt;/pre&gt;</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-380</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-380</guid>
			<pubDate>Sun, 28 Dec 2008 21:02:35 GMT</pubDate>
		</item>
		<item>
			<title>db</title>
			<description>Love your work :)</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-346</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-346</guid>
			<pubDate>Thu, 23 Oct 2008 15:16:41 GMT</pubDate>
		</item>
		<item>
			<title>SoumenTrivedi</title>
			<description>I have tested this code, and it seems to return the id for the tag name and field name passed. This piece of code has helped resolving the issues with fetching element ids&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;function getElementId(_tagName,_fieldName) {
	var elements = document.getElementsByTagName(_tagName);
	if (elements != null &amp;amp;&amp;amp; elements.length != 0) {
		for (i=0, x=elements.length; i&amp;lt;x; i++) {
			if(elements[i].id.match(_fieldName) != null) {
			return elements[i].id;
			}
		}
	}
}&lt;/pre&gt;
&lt;br /&gt;
For null checks as well the code which i have used and I feel it can be of help to this forum:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;function IsNotEmpty(aTextField) {
	if (aTextField != null) {
		if (( aTextField.value == 'undefined') || (aTextField.value == null)) {
			return true;
		} else {
			return false;
		}
	} else {
		return true;
	}
}
&lt;/pre&gt;</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-285</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-285</guid>
			<pubDate>Wed, 16 Jul 2008 15:51:18 GMT</pubDate>
		</item>
		<item>
			<title>CJohnson</title>
			<description>var ThisIsYourElementID = document.GetElementByID('ThisIstheIDofYourElement');</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-215</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-215</guid>
			<pubDate>Wed, 19 Mar 2008 22:45:33 GMT</pubDate>
		</item>
		<item>
			<title>shaira</title>
			<description>Hi,&lt;br /&gt;
I want to identify all the javascript elements by Id.&lt;br /&gt;
How do i do that?</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-134</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-134</guid>
			<pubDate>Thu, 29 Nov 2007 06:38:41 GMT</pubDate>
		</item>
		<item>
			<title>pete</title>
			<description>You might find this site interesting too:&lt;br /&gt;
&lt;br /&gt;
http://webbugtrack.blogspot.com/2007/08/bug-152-getelementbyid-returns.html&lt;br /&gt;
&lt;br /&gt;
It points out that the getElementById method in IE6 and IE7 is *STILL* broken! and will return the wrong objects (if you aren't very careful)&lt;br /&gt;
&lt;br /&gt;
A workaround for the bug is also provided at the end of the article.</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-88</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-88</guid>
			<pubDate>Wed, 26 Sep 2007 18:16:24 GMT</pubDate>
		</item>
		<item>
			<title>manchumahara</title>
			<description>very help full. thanx a lot</description>
			<link>http://www.netlobo.com/comments/javascript_get_element_id#comment-75</link>
			<guid>http://www.netlobo.com/comments/javascript_get_element_id#comment-75</guid>
			<pubDate>Mon, 10 Sep 2007 22:38:24 GMT</pubDate>
		</item>
	</channel>
</rss>

<!-- pageGen: 0.0019 secs -->
<!-- memcache hits: 2 memcache misses: 0 -->