Hide NN6 layers on mouseout

C

Chris Kennedy

The function below is used to hide a div on it's mouseout event. As you can
see it is for IE and NN 4 (incidentally I enclosed the div in an NN 4 layer
to get the mousout event for that). I can add to this code to hide the div
in NN 6 but the the mouseout event is triggered by the mouse rolling out of
the text within the div not the whole div itself. I found some code, which I
don't fully understand, but resolves this problem in IE(see below) but I
can't find an equivalent solution for NN 6. Does anyone have any ideas.
Regards, Chris.


function hideMenu()
{
if (document.all)
{
if (event.toElement != HomeMenu && HomeMenu.contains(event.toElement) ==
false)
{
document.all.HomeMenu.style.visibility="hidden";
}
}
else if (document.layers)
{
document.HomeMenu.visibility="hidden";
}
}

THIS IS THE NN 6 code in which the mouseout doesn't work 'properly'

else if (!document.all && document.getElementById)
{
document.getElementById("HomeMenu").style.visibility="hidden";
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top