R
Robert Mark Bram
Howdy all!
I have built a page that uses CSS in such a way that rolling mouse over the
link should hide and display a red box with Hello World in it.. it works in
IE but not in Netscape. Can anyone tell me why? I don't think it is the
JavaScript - Netscape isn't displaying the layer as red.. nor is it
displaying it in the correct position...
Any help would be most appreciated!
Rob
<html>
<head>
<title>Listing 12.1</title>
<style type="text/css">
<!--
#layer
{
background-color:red;
height:100px;
left:10px;
position:absolute;
top:50px;
width:100px;
visibility:hidden;
}
-->
</style>
<script type="text/javascript">
function changeState (layerName, state)
{
var blockElement = document.getElementById(layerName);
blockElement.style.visibility = state;
} // end changeState function
</script>
</head>
<body onLoad="obtainInfo();">
<div name="layer" id="layer">
Hello World!
</div>
<p>
<a href="javascript:void(0)"
onMouseOut="changeState('layer','hidden')"
onMouseOver="changeState('layer','visible')">
Rollover to show and hide the layer.
</a>
</p>
</body>
</html>
I have built a page that uses CSS in such a way that rolling mouse over the
link should hide and display a red box with Hello World in it.. it works in
IE but not in Netscape. Can anyone tell me why? I don't think it is the
JavaScript - Netscape isn't displaying the layer as red.. nor is it
displaying it in the correct position...
Any help would be most appreciated!
Rob
<html>
<head>
<title>Listing 12.1</title>
<style type="text/css">
<!--
#layer
{
background-color:red;
height:100px;
left:10px;
position:absolute;
top:50px;
width:100px;
visibility:hidden;
}
-->
</style>
<script type="text/javascript">
function changeState (layerName, state)
{
var blockElement = document.getElementById(layerName);
blockElement.style.visibility = state;
} // end changeState function
</script>
</head>
<body onLoad="obtainInfo();">
<div name="layer" id="layer">
Hello World!
</div>
<p>
<a href="javascript:void(0)"
onMouseOut="changeState('layer','hidden')"
onMouseOver="changeState('layer','visible')">
Rollover to show and hide the layer.
</a>
</p>
</body>
</html>