You are here: irt.org | FAQ | DHTML | Q884 [ previous next ]
Try:
<style type="text/css"><!--
.myStyle {
position: absolute;
visibility: hidden;
}
//--></style>
<span id="text" class="myStyle">
<table bgcolor="#ffffcc"><tr><td>
Heres<br>some<br><b>bold<br>text</b><br>in<br>a<br>layer
</td></tr></table>
</span>
<script language="JavaScript"><!--
function show(object,x,y) {
if (document.layers && document.layers[object] != null) {
document.layers[object].left = x;
document.layers[object].top = y;
}
else if (document.all) {
document.all[object].style.posLeft = x;
document.all[object].style.posTop = y;
}
if (document.layers && document.layers[object] != null)
document.layers[object].visibility = 'visible';
else if (document.all)
document.all[object].style.visibility = 'visible';
}
function hide(object) {
if (document.layers && document.layers[object] != null)
document.layers[object].visibility = 'hidden';
else if (document.all)
document.all[object].style.visibility = 'hidden';
}
//--></script>
<a href="#" onMouseOver="if (window.all || document.layers) show('text',100,300)" onMouseOut="hide('text')">Reveal layer</a>