Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1191 How can I change the visibility of a layer (in Netscape) using the onMouseOver event handler?

You are here: irt.org | FAQ | DHTML | Q1191 [ previous next ]

First for all both Netscape Navigator 4 and Internet Explorer 4 browsers:

<script type="text/javascript" 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';
}

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>

<style type="text/css"><!--
.myLayersClass { position: absolute; visibility: hidden; }
//--></style>

<a href="index.htm" onMouseOver="show('xxxx')" onMouseOut="hide('xxxx')">Link Text</a>

<div id="xxxx" class="myLayersClass">
Put some text in this layer...
</div>

And for just Netscape Navigator 4:

<script type="text/javascript" language="JavaScript"><!--
function show(object) {
    if (document.layers && document.layers[object])
        document.layers[object].visibility = 'visible';
}

function hide(object) {
    if (document.layers && document.layers[object])
        document.layers[object].visibility = 'hidden';
}
//--></script>

<style type="text/css"><!--
.myLayersClass { position: absolute; visibility: hidden; }
//--></style>

<a href="index.htm" onMouseOver="show('xxxx')" onMouseOut="hide('xxxx')">Link Text</a>

<div id="xxxx" class="myLayersClass">
Put some text in this layer...
</div>

Feedback on 'Q1191 How can I change the visibility of a layer (in Netscape) using the onMouseOver event handler?'

©2018 Martin Webb