You are here: irt.org | FAQ | DHTML | Q1408 [ previous next ]
Try:
<script language="JavaScript"><!-- function show(object) { if (document.layers && document.layers[object]) document.layers[object].visibility = 'visible'; else if (document.all) { document.all[object].style.visibility = 'visible'; document.all[object].style.zIndex = 100; } } function hide(object) { if (document.layers && document.layers[object]) document.layers[object].visibility = 'hidden'; else if (document.all) document.all[object].style.visibility = 'hidden'; } //--></script> <div id="myId" style="position: relative; visibility: hidden;">Hidden Layer</div> <div style="position: relative; visibility: visible;"> <a href="javascript:;" onClick="window.show('myId')">show layer</a> <a href="javascript:;" onClick="window.hide('myId')">hide layer</a> </div>