<?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: Javascript Code to show a hidden element &#124; Display and Visibility</title>
	<atom:link href="http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=javascript-code-to-show-a-hidden-element</link>
	<description>Evan&#039;s Interactive Actionscript Exploration</description>
	<lastBuildDate>Wed, 21 Jul 2010 12:42:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Nazeer</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1411</link>
		<dc:creator>Nazeer</dc:creator>
		<pubDate>Sat, 03 Jul 2010 16:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1411</guid>
		<description>Great Post.

I&#039;m running into a problem were I have SWFObject is placed into a DIV tag in the HTML Page. I have registered javaScript CallBack (ExternalInterface) function in this SWF file to do some action when a HTML button pressed/onClicked. This is very simple and up to this point works perfectly.

But it&#039;s failed in IE after applying style to that DIV tag.Basically I&#039;m trying to invoke the registered action script function from java script. Again this works in Mozilla not in IE.

Here is some of the style I used for the DIV tag the one contains the SWFObject.

document.getElementById(&quot;two&quot;).style.visibility = &#039;hidden&#039;

document.getElementById(&quot;two&quot;).style.filter=&quot;alpha(opacity=80)&quot;;

Looks like the interface get unregistered by itself when the style applied to the container tag(DIV tag).

Well I&#039;m not a HTML expert, not sure this might be a bug /???..

Any suggestion here?</description>
		<content:encoded><![CDATA[<p>Great Post.</p>
<p>I&#8217;m running into a problem were I have SWFObject is placed into a DIV tag in the HTML Page. I have registered javaScript CallBack (ExternalInterface) function in this SWF file to do some action when a HTML button pressed/onClicked. This is very simple and up to this point works perfectly.</p>
<p>But it&#8217;s failed in IE after applying style to that DIV tag.Basically I&#8217;m trying to invoke the registered action script function from java script. Again this works in Mozilla not in IE.</p>
<p>Here is some of the style I used for the DIV tag the one contains the SWFObject.</p>
<p>document.getElementById(&#8220;two&#8221;).style.visibility = &#8216;hidden&#8217;</p>
<p>document.getElementById(&#8220;two&#8221;).style.filter=&#8221;alpha(opacity=80)&#8221;;</p>
<p>Looks like the interface get unregistered by itself when the style applied to the container tag(DIV tag).</p>
<p>Well I&#8217;m not a HTML expert, not sure this might be a bug /???..</p>
<p>Any suggestion here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russ</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1394</link>
		<dc:creator>russ</dc:creator>
		<pubDate>Mon, 14 Jun 2010 21:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1394</guid>
		<description>EUREKA! Figured it out (am I smart after all??)

individually named functions attached to buttons, each setting one div to display and the others to hide.

awesome, thanks so much!</description>
		<content:encoded><![CDATA[<p>EUREKA! Figured it out (am I smart after all??)</p>
<p>individually named functions attached to buttons, each setting one div to display and the others to hide.</p>
<p>awesome, thanks so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Mullins</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1393</link>
		<dc:creator>Evan Mullins</dc:creator>
		<pubDate>Mon, 14 Jun 2010 21:30:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1393</guid>
		<description>I&#039;d set up the function to accept a parameter, then you can pass the specific div you want shown and have it hide the rest.
[cc lang=&quot;javascript]
function showMe(toShow){
document.getElementById(&quot;toggleMe1&quot;).style.display = &quot;none&quot;;
document.getElementById(&quot;toggleMe2&quot;).style.display = &quot;none&quot;;  document.getElementById(&quot;toggleMe3&quot;).style.display = &quot;none&quot;;
document.getElementById(&quot;toggleMe4&quot;).style.display = &quot;none&quot;;

document.getElementById(toShow).style.display = &quot;&quot;;
}[/cc]
and then from each button you would call the same function but pass in the specific id. 
[cc lang=&quot;html&quot;]
&lt;a href=&quot;#&quot; onclick=&quot;showMe(&#039;toggleMe4&#039;);&quot;&gt;Click to toggle display.&lt;/a&gt;
[/cc]</description>
		<content:encoded><![CDATA[<p>I&#8217;d set up the function to accept a parameter, then you can pass the specific div you want shown and have it hide the rest.</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function showMe(toShow){<br />
document.getElementById(&quot;toggleMe1&quot;).style.display = &quot;none&quot;;<br />
document.getElementById(&quot;toggleMe2&quot;).style.display = &quot;none&quot;; &nbsp;document.getElementById(&quot;toggleMe3&quot;).style.display = &quot;none&quot;;<br />
document.getElementById(&quot;toggleMe4&quot;).style.display = &quot;none&quot;;<br />
<br />
document.getElementById(toShow).style.display = &quot;&quot;;<br />
}</div></td></tr></tbody></table></div>
<p>and then from each button you would call the same function but pass in the specific id.</p>
<div class="codecolorer-container html4strict mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;showMe('toggleMe4');&quot;</span>&gt;</span>Click to toggle display.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: russ</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1392</link>
		<dc:creator>russ</dc:creator>
		<pubDate>Mon, 14 Jun 2010 21:13:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1392</guid>
		<description>thanks evan for your help, but this logical code seems like it would work for only one button and two divs. I will have several buttons, each for showing/hiding a related div. Can I give the toggleDisplay functions id&#039;s (like div&#039;s), then associate each id&#039;ed function with a button? again, mucho gracias.</description>
		<content:encoded><![CDATA[<p>thanks evan for your help, but this logical code seems like it would work for only one button and two divs. I will have several buttons, each for showing/hiding a related div. Can I give the toggleDisplay functions id&#8217;s (like div&#8217;s), then associate each id&#8217;ed function with a button? again, mucho gracias.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Mullins</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1391</link>
		<dc:creator>Evan Mullins</dc:creator>
		<pubDate>Mon, 14 Jun 2010 20:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1391</guid>
		<description>russ- it would be pretty simple, what you&#039;d want to do is have two separate id&#039;s addressed in the function, just show one and hide the other.
[cc lang=&quot;javascript&quot;]
function toggleDisplay() {
  if(document.getElementById(&quot;toggleMe1&quot;).style.display == &quot;none&quot; ) {
    document.getElementById(&quot;toggleMe1&quot;).style.display = &quot;&quot;;
    document.getElementById(&quot;toggleMe2&quot;).style.display = &quot;none&quot;;
  }
  else {
    document.getElementById(&quot;toggleMe1&quot;).style.display = &quot;none&quot;;
    document.getElementById(&quot;toggleMe2&quot;).style.display = &quot;&quot;;
  }
}
[/cc]
best,</description>
		<content:encoded><![CDATA[<p>russ- it would be pretty simple, what you&#8217;d want to do is have two separate id&#8217;s addressed in the function, just show one and hide the other.</p>
<div class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> toggleDisplay<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;toggleMe1&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;none&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;toggleMe1&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;toggleMe2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;toggleMe1&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;toggleMe2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>best,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russ</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1390</link>
		<dc:creator>russ</dc:creator>
		<pubDate>Mon, 14 Jun 2010 19:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1390</guid>
		<description>Lotsa info on your nice site, will like to peruse it later, but now...

I&#039;m trying to find a way to toggle a set of divs with buttons so when a button is clicked it both toggles the visibility of its associated div, AND hides any other div that may be showing at the time. (The divs are stacked translucent pngs over a background image so only one can show at any time.)

I&#039;ve found all sorts of variations on javascript toggling, but none yet that works like this (and I&#039;m not smart enough to craft it from them). Would appreciate any help you might be able to give.

thanks!
russ</description>
		<content:encoded><![CDATA[<p>Lotsa info on your nice site, will like to peruse it later, but now&#8230;</p>
<p>I&#8217;m trying to find a way to toggle a set of divs with buttons so when a button is clicked it both toggles the visibility of its associated div, AND hides any other div that may be showing at the time. (The divs are stacked translucent pngs over a background image so only one can show at any time.)</p>
<p>I&#8217;ve found all sorts of variations on javascript toggling, but none yet that works like this (and I&#8217;m not smart enough to craft it from them). Would appreciate any help you might be able to give.</p>
<p>thanks!<br />
russ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Mullins</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1289</link>
		<dc:creator>Evan Mullins</dc:creator>
		<pubDate>Wed, 10 Feb 2010 14:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1289</guid>
		<description>I&#039;d try it out as such:
[cc lang=html&quot;]
&lt;a href=&quot;#&quot; onmouseover=&quot;toggleDisplay();&quot;&gt;Click to toggle display.&lt;/a&gt;
[/cc]
Some more reading: http://lmgtfy.com/?q=javascript+onmouseover</description>
		<content:encoded><![CDATA[<p>I&#8217;d try it out as such:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;a href=&quot;#&quot; onmouseover=&quot;toggleDisplay();&quot;&gt;Click to toggle display.&lt;/a&gt;</div></td></tr></tbody></table></div>
<p>Some more reading: <a href="http://lmgtfy.com/?q=javascript+onmouseover" rel="nofollow">http://lmgtfy.com/?q=javascript+onmouseover</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jojo</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1286</link>
		<dc:creator>jojo</dc:creator>
		<pubDate>Wed, 03 Feb 2010 07:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1286</guid>
		<description>Hi this posting is awesome..

But how can i make it this event onclick to onmouseover?
I tried it but its not working well.

Please help me...</description>
		<content:encoded><![CDATA[<p>Hi this posting is awesome..</p>
<p>But how can i make it this event onclick to onmouseover?<br />
I tried it but its not working well.</p>
<p>Please help me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kassim</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1231</link>
		<dc:creator>kassim</dc:creator>
		<pubDate>Wed, 11 Nov 2009 14:43:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1231</guid>
		<description>HI  this is my code ...here if i click my link it toggle&#039;s the text ...but it  movin automatically to the top of the page ....help me out ....</description>
		<content:encoded><![CDATA[<p>HI  this is my code &#8230;here if i click my link it toggle&#8217;s the text &#8230;but it  movin automatically to the top of the page &#8230;.help me out &#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Mullins</title>
		<link>http://blog.circlecube.com/2007/11/tutorial/javascript-code-to-show-a-hidden-element/#comment-1093</link>
		<dc:creator>Evan Mullins</dc:creator>
		<pubDate>Thu, 07 May 2009 21:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2007/12/01/javascript-code-to-show-a-hidden-element/#comment-1093</guid>
		<description>This isn&#039;t too hard, just takes a few more lines. Have your &quot;Less [-]&quot; link inside the div that will be hidden, and when it is hidden, then show a separate div that simply says &quot;More [+]&quot;. So rather than just showing/hiding one element on the page you just need to show one and simultaneously hide another.</description>
		<content:encoded><![CDATA[<p>This isn&#8217;t too hard, just takes a few more lines. Have your &#8220;Less [-]&#8221; link inside the div that will be hidden, and when it is hidden, then show a separate div that simply says &#8220;More [+]&#8220;. So rather than just showing/hiding one element on the page you just need to show one and simultaneously hide another.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 5/12 queries in 0.007 seconds using disk

Served from: blog.circlecube.com @ 2010-08-01 10:51:34 -->