About using the toggleMenu javascript

Please note: the following javascript is worked ONLY IN IE only, it cannot be used under FF... Dunno why:

function toggleMenu(oA){
var oTd = oA.parentElement;
var cSpan;

if (oTd != null && 'undefined' != typeof(oTd)){
cSpan = oTd.getElementsByTagName("div");

if (0 < cSpan.length){
if (-1 != cSpan[0].id.indexOf("something")){
if ('none' == cSpan[0].style.display){
cSpan[0].style.display = 'block';
} else {
cSpan[0].style.display = 'none';


<tr><td><a href="'javascript:toggleMenu(<tag_ID_attribute_with_words_'something');'">My Link</a></td></tr>
<tr><td><div id="<tag_ID_attribute_with_words_'something' " style="'display:none;'">Some content</div></td></tr>

Note here for reference only.


Popular posts from this blog

TCPDF How to show/display Chinese Character?

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services

Using wget bypass htaccess username password 401 authorization