I have been using this javascript for awhile now, and just realized that it does not work in Firefox, any ideas why? <script language="JavaScript"> <!-- function Show_Stuff(Click_Menu) // Function that will swap the display/no display for // all content within span tags { if (Click_Menu.style.display == "none") { Click_Menu.style.display = ""; } else { Click_Menu.style.display = "none"; } } --> </script> The javascript is getting called with a link like this: <a href="javascript:Show_Stuff(display1)">Click Here</a> And then that will show or hide what is in this span: <span ID="display1" style="display: none"> STUFF HERE </span> This works fine in IE. Thanks in advance.
<script type="text/javascript"> function Show_Stuff(Click_Menu_ID){ var nSpan = document.getElementById(Click_Menu_ID); if (nSpan.style.display == "none") { nSpan.style.display = ""; } else { nSpan.style.display = "none"; } } </script> Code (markup): <a href="#" onclick="Show_Stuff('display1');return false">Click Here</a> Code (markup): <span id="display1" style="display:none"> STUFF HERE </span> Code (markup):
You're welcome, but I don't see how you failed to pay attention to detail. I learn new things all the time.