Hi, I have a few javascript functions which work perfectly well in Firefox, but do nothing in IE.
Since they DO work in FF, there must be some very small tweaking that needs to be done to make this understandable for IE..
I didnt include the CSS
Javascript:
and here is the HTMLCode:<script type="text/javascript"> <!-- var state = 'hidden'; function showhide(layer_ref) { if (state == 'visible') { state = 'hidden'; } else { state = 'visible'; } if (document.all) { eval( "document.all." + layer_ref + ".style.visibility = state"); } if (document.layers) { document.layers[layer_ref].visibility = state; } if (document.getElementById && !document.all) { maxwell_smart = document.getElementById(layer_ref); maxwell_smart.style.visibility = state; } } function hide(layer_ref) { if (state == 'visible') { state = 'hidden'; } if (document.all) { eval( "document.all." + layer_ref + ".style.visibility = state"); } if (document.layers) { document.layers[layer_ref].visibility = state; } if (document.getElementById && !document.all) { maxwell_smart = document.getElementById(layer_ref); maxwell_smart.style.visibility = state; } } //--> </script>
Has anybody else come across a problem like this?HTML Code:<div class="ivo2"> <div class="ivo2-nav"> <a href="#" onclick="showhide('ivo2-block1');document.getElementById('ivo2-nav-link1').style.background='#FFA766';document.getElementById('ivo2-nav-link2').style.background='#FFD69D';hide('ivo2-block2');return false" id="ivo2-nav-link1">Most Active</a> </div> <div class="ivo2-nav"> <a href="#" onclick="showhide('ivo2-block2');document.getElementById('ivo2-nav-link1').style.background='#FFD69D';document.getElementById('ivo2-nav-link2').style.background='#FFA766';hide('ivo2-block1');return false" id="ivo2-nav-link2">New</a> </div> <div id="ivo2-block1">foo</div> <div id="ivo2-block2">bar</div> </div>


Reply With Quote
Bookmarks