<?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: Using Javascript to hide single/multiple div tags with the same name</title>
	<atom:link href="http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/</link>
	<description>Misc crap and such</description>
	<lastBuildDate>Wed, 14 Dec 2011 02:21:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: saviola</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-738</link>
		<dc:creator>saviola</dc:creator>
		<pubDate>Fri, 02 Jul 2010 13:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-738</guid>
		<description>Nice exmple, here you are more simple way whit JQuery show/hide:

function enableDisableDiv() {
  if ($(&quot;#chkShowPersonal&quot;).attr(&quot;checked&quot;)) {
    $(&quot;#dvPersonal&quot;).show(&quot;fast&quot;);
  } else {
    $(&quot;#dvPersonal&quot;).hide(&quot;fast&quot;);
  }
}



    Put somthing here!
</description>
		<content:encoded><![CDATA[<p>Nice exmple, here you are more simple way whit JQuery show/hide:</p>
<p>function enableDisableDiv() {<br />
  if ($(&#8220;#chkShowPersonal&#8221;).attr(&#8220;checked&#8221;)) {<br />
    $(&#8220;#dvPersonal&#8221;).show(&#8220;fast&#8221;);<br />
  } else {<br />
    $(&#8220;#dvPersonal&#8221;).hide(&#8220;fast&#8221;);<br />
  }<br />
}</p>
<p>    Put somthing here!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: benjamin</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-708</link>
		<dc:creator>benjamin</dc:creator>
		<pubDate>Wed, 23 Jun 2010 15:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-708</guid>
		<description>Thanks man, this was real helpful. I figured manipulating a bunch of divs having the same id would be easy, but clearly I was going about it all wrong. This gave me all the help I needed to get moving in the right direction.

Thanks again!</description>
		<content:encoded><![CDATA[<p>Thanks man, this was real helpful. I figured manipulating a bunch of divs having the same id would be easy, but clearly I was going about it all wrong. This gave me all the help I needed to get moving in the right direction.</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frankcpl</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-565</link>
		<dc:creator>Frankcpl</dc:creator>
		<pubDate>Wed, 19 May 2010 13:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-565</guid>
		<description>I know this is an old site, but still has a very useful bit of information that is helping me understand javascript.
Thanks a ton</description>
		<content:encoded><![CDATA[<p>I know this is an old site, but still has a very useful bit of information that is helping me understand javascript.<br />
Thanks a ton</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: APPAJI</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-236</link>
		<dc:creator>APPAJI</dc:creator>
		<pubDate>Thu, 19 Nov 2009 10:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-236</guid>
		<description>greate help to know about div hide/show.. its exceleet</description>
		<content:encoded><![CDATA[<p>greate help to know about div hide/show.. its exceleet</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaijoubuKun</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-182</link>
		<dc:creator>DaijoubuKun</dc:creator>
		<pubDate>Sun, 06 Sep 2009 18:37:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-182</guid>
		<description>Now I feel silly. I saw your second post first, the first one ended up in my spam filter. Next time I&#039;m going to wait to respond until I&#039;m awake enough to comprehend what&#039;s going on before I respond. Thanks for the info. I will look into it more and see what else can be done. Since I&#039;m not adept to js, sometimes it&#039;s very new to me. Hopefully soon I will have a cool new blog post showing what other things can be done with this same script.</description>
		<content:encoded><![CDATA[<p>Now I feel silly. I saw your second post first, the first one ended up in my spam filter. Next time I&#8217;m going to wait to respond until I&#8217;m awake enough to comprehend what&#8217;s going on before I respond. Thanks for the info. I will look into it more and see what else can be done. Since I&#8217;m not adept to js, sometimes it&#8217;s very new to me. Hopefully soon I will have a cool new blog post showing what other things can be done with this same script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orion808</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-181</link>
		<dc:creator>orion808</dc:creator>
		<pubDate>Sun, 06 Sep 2009 17:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-181</guid>
		<description> is what I used...and it works fine. I changed the class of the tr tag, not the name.

I do think I tried putting the row inside of a div, but I had an issue...most likely something else if you&#039;re saying it would work. I also tried putting the div inside of the row/column and when hidden, the row still existed, but was empty (noted by some weird line-height issues).

Also, I never said it was broken, or that I didn&#039;t get mine to work. I just changed your code around to suit my needs and thought I&#039;d share. This was a big help.</description>
		<content:encoded><![CDATA[<p>is what I used&#8230;and it works fine. I changed the class of the tr tag, not the name.</p>
<p>I do think I tried putting the row inside of a div, but I had an issue&#8230;most likely something else if you&#8217;re saying it would work. I also tried putting the div inside of the row/column and when hidden, the row still existed, but was empty (noted by some weird line-height issues).</p>
<p>Also, I never said it was broken, or that I didn&#8217;t get mine to work. I just changed your code around to suit my needs and thought I&#8217;d share. This was a big help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaijoubuKun</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-180</link>
		<dc:creator>DaijoubuKun</dc:creator>
		<pubDate>Sun, 06 Sep 2009 17:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-180</guid>
		<description>I&#039;ve never tried to hide a table tag. This code was written for div tags.

In the line: var hellos = getElementsByClass(class_name, null, &quot;tr&quot;);  did you change the class_name to match the tr tag&#039;s name?

I would simply put the tr tag inside a div tag for this example. If I had more free time I would try to get the tr tag working myself. Maybe towards the end of this next week I will have a chance. If I figure it out I will let you know and I may even write a blog post. Good luck!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve never tried to hide a table tag. This code was written for div tags.</p>
<p>In the line: var hellos = getElementsByClass(class_name, null, &#8220;tr&#8221;);  did you change the class_name to match the tr tag&#8217;s name?</p>
<p>I would simply put the tr tag inside a div tag for this example. If I had more free time I would try to get the tr tag working myself. Maybe towards the end of this next week I will have a chance. If I figure it out I will let you know and I may even write a blog post. Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orion808</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-178</link>
		<dc:creator>orion808</dc:creator>
		<pubDate>Sun, 06 Sep 2009 16:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-178</guid>
		<description>Also...my input changed. Not the &quot;autocomplete&quot;. This was to fix an issue with Firefox remembering the state of the input field...which I didn&#039;t want to happen.

My page now hides certain rows by default, and only shows them if the user checks the input box (which says something like &quot;Show all achievements&quot;).

</description>
		<content:encoded><![CDATA[<p>Also&#8230;my input changed. Not the &#8220;autocomplete&#8221;. This was to fix an issue with Firefox remembering the state of the input field&#8230;which I didn&#8217;t want to happen.</p>
<p>My page now hides certain rows by default, and only shows them if the user checks the input box (which says something like &#8220;Show all achievements&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orion808</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-177</link>
		<dc:creator>orion808</dc:creator>
		<pubDate>Sun, 06 Sep 2009 15:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-177</guid>
		<description>I&#039;ve slightly edited the code to what you see below. I am using it to hide rows in a table (thus the &quot;tr&quot;). 

I also changed &quot;function toggle_hideme()&quot; to &quot;function toggle_hideme(class_name)&quot; and replaced the static class name with this variable. Does that even make sense? Basically, no matter what class name I had in my html/php, I had to go in and edit my javascript to reflect it. Now the class name is a variable that is passed through the input&#039;s onclick to the function.

Also, changing the &quot;var hidden = true&quot; to false...what does that affect?

var hidden = true;
function getElementsByClass(searchClass, domNode, tagName) {
	if (domNode == null) domNode = document;
	if (tagName == null) tagName = &#039;*&#039;;
	var el = new Array();
	var tags = domNode.getElementsByTagName(tagName);
	var tcl = &quot; &quot;+searchClass+&quot; &quot;;
	for(i=0,j=0; i&lt;tags.length; i++) {
		var test = &quot; &quot; + tags[i].className + &quot; &quot;;
		if (test.indexOf(tcl) != -1)
		el[j++] = tags[i];
	}
	return el;
}
 
function toggle_hideme(class_name)
{
	hidden = !hidden;
	var newDisplay;
	if(hidden)
	{
		newDisplay = &#039;none&#039;;
	}
	else
	{
		newDisplay = &#039;block&#039;;
	}
	var hellos = getElementsByClass(class_name, null, &quot;tr&quot;);
	
	for(var i = 0; i &lt; hellos.length; i++)
	{
		hellos[i].style.display = newDisplay;
	}
}

I&#039;ll try to check back on this enough to await your reply.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve slightly edited the code to what you see below. I am using it to hide rows in a table (thus the &#8220;tr&#8221;). </p>
<p>I also changed &#8220;function toggle_hideme()&#8221; to &#8220;function toggle_hideme(class_name)&#8221; and replaced the static class name with this variable. Does that even make sense? Basically, no matter what class name I had in my html/php, I had to go in and edit my javascript to reflect it. Now the class name is a variable that is passed through the input&#8217;s onclick to the function.</p>
<p>Also, changing the &#8220;var hidden = true&#8221; to false&#8230;what does that affect?</p>
<p>var hidden = true;<br />
function getElementsByClass(searchClass, domNode, tagName) {<br />
	if (domNode == null) domNode = document;<br />
	if (tagName == null) tagName = &#8216;*&#8217;;<br />
	var el = new Array();<br />
	var tags = domNode.getElementsByTagName(tagName);<br />
	var tcl = &#8221; &#8220;+searchClass+&#8221; &#8220;;<br />
	for(i=0,j=0; i&lt;tags.length; i++) {<br />
		var test = &quot; &quot; + tags[i].className + &quot; &quot;;<br />
		if (test.indexOf(tcl) != -1)<br />
		el[j++] = tags[i];<br />
	}<br />
	return el;<br />
}</p>
<p>function toggle_hideme(class_name)<br />
{<br />
	hidden = !hidden;<br />
	var newDisplay;<br />
	if(hidden)<br />
	{<br />
		newDisplay = &#039;none&#039;;<br />
	}<br />
	else<br />
	{<br />
		newDisplay = &#039;block&#039;;<br />
	}<br />
	var hellos = getElementsByClass(class_name, null, &quot;tr&quot;);</p>
<p>	for(var i = 0; i &lt; hellos.length; i++)<br />
	{<br />
		hellos[i].style.display = newDisplay;<br />
	}<br />
}</p>
<p>I&#039;ll try to check back on this enough to await your reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaijoubuKun</title>
		<link>http://blog.tangorangers.com/2009/03/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name/comment-page-1/#comment-166</link>
		<dc:creator>DaijoubuKun</dc:creator>
		<pubDate>Fri, 14 Aug 2009 23:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=104#comment-166</guid>
		<description>Check out http://blog.tangorangers.com/2009/08/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name-part-2/
That answers your question. Also, thanks for the e-mail containing your html so I was able to validate that it was something with my code. I hope it works out for you. Thanks again.</description>
		<content:encoded><![CDATA[<p>Check out <a href="http://blog.tangorangers.com/2009/08/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name-part-2/" rel="nofollow">http://blog.tangorangers.com/2009/08/using-javascript-to-hide-singlemultiple-div-tags-with-the-same-name-part-2/</a><br />
That answers your question. Also, thanks for the e-mail containing your html so I was able to validate that it was something with my code. I hope it works out for you. Thanks again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

