i'm facing a problem, that is when i'm trying to "Show" and "Hide" the "layermenu" layer (as stated below), Nestcape 6 seems like can't detect the onMouseOver and onMouseOut events.
<Div ID="layermenu" Class="myStyle" onMouseOver=showLot("layermenu") onMouseOut=hideLot("layermenu")>
the class myStyle is inside the pagecss.css, as stated below:
.myStyle {position:absolute; left: 318px; top:-15px; visibility:hidden;}
My javascript for display and hide the layer is stated as :
function showLot(id)
{
ns4=(document.layers)? true:false
ie4=(document.all)? true:false
if (ns4)
{ document.layers[id].visibility="visible"
}
else if (ie4)
{
document.all[id].style.visibility="visible"
}
}
function hideLot(id)
{
ns4=(document.layers)? true:false
ie4=(document.all)? true:false
if (ns4)
{ document.layers[id].visibility="hidden"
}
else if (ie4)
{
document.all[id].style.visibility="hidden"
}
}
IE5 work fine with above code. But fail in Nestcape 6
i'm trying to use
document.getElementById("layermenu").attachEvent("onmouseover", showLot("layermenu"))
or document.getElementById("layermenu".style.visibility,
it fail in IE5 as well as Nestcape6, error message with "object document.getElementById("...")is null" come out. How come?
for me, I don't think there have anything wrong with my code, but...
Please help.!!
charon
<Div ID="layermenu" Class="myStyle" onMouseOver=showLot("layermenu") onMouseOut=hideLot("layermenu")>
the class myStyle is inside the pagecss.css, as stated below:
.myStyle {position:absolute; left: 318px; top:-15px; visibility:hidden;}
My javascript for display and hide the layer is stated as :
function showLot(id)
{
ns4=(document.layers)? true:false
ie4=(document.all)? true:false
if (ns4)
{ document.layers[id].visibility="visible"
}
else if (ie4)
{
document.all[id].style.visibility="visible"
}
}
function hideLot(id)
{
ns4=(document.layers)? true:false
ie4=(document.all)? true:false
if (ns4)
{ document.layers[id].visibility="hidden"
}
else if (ie4)
{
document.all[id].style.visibility="hidden"
}
}
IE5 work fine with above code. But fail in Nestcape 6
i'm trying to use
document.getElementById("layermenu").attachEvent("onmouseover", showLot("layermenu"))
or document.getElementById("layermenu".style.visibility,
it fail in IE5 as well as Nestcape6, error message with "object document.getElementById("...")is null" come out. How come?
for me, I don't think there have anything wrong with my code, but...
Please help.!!
charon
Comment