Forum Moderators: open

Message Too Old, No Replies

Can someone tell me why?

layer disappears when mouseOver

         

JayH

2:09 pm on Nov 3, 2003 (gmt 0)

10+ Year Member



On my html page, I have placed layer with an 'onMouseOut' event that is used to hide the layer. Within the layer is a table with has a list of links as illustrated below :

<div id="Layername".... onMouseOut="PopUpLayer(this,'hidden');">
<table width="100%" ...>
<tr>
<td><a href...>Line 1</a></td>
<tr>
....
</table>
</div>

The code code for hiding the layer :
function PopUpLayer(obj,action){
obj.style.visibility=action;
}

I have tried putting in an 'onMouseOver="PopUpLayer(this,'visible');' to solve the problem but this just slows the performance of the menu.

Can someone explain why the layer disappears as soon as my cursor is place in the layer? How can I get around this? And is there a better way to do this?

Thanks in advance!

DrDoc

5:34 pm on Nov 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

Because the layer loses focus immediately. You hover the table, not the div, even though the table resides inside the div. But it's the innermost element that counts.

JayH

8:42 am on Nov 5, 2003 (gmt 0)

10+ Year Member



Thanks, I moved the events around. It works much better.