You are here: irt.org | FAQ | DHTML | Q983 [ 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> <form> <input type="button" onClick="show('myId')" value="Show"> <input type="button" onClick="hide('myId')" value="Hide"> </form> <div id="myId" style="position: absolute; visibility: visible;">Test</div>