Click to See Complete Forum and Search --> : Nesting and collapse


Autumn
02-04-2003, 09:59 AM
Look at the attached code, please, it is easier to understand what I refer to then. In the code I want to collapse the folders after I 'mouseout' on them. But I cannot get the damn thing to work. Either the nested folders doesn't close after I 'mouseout' on them or the lowest leveled folders to open.

Any suggestions are welcomed,
Autumn

gil davis
02-04-2003, 10:16 AM
I can see your frustration.

In IE, you will get a bubble effect as you mouseover different things. If you put an alert on the function checkcontained() for the srcElement, you will see what I mean.

Maybe you should use mouseout to close the menus. It might simplify your logic.

Personally, I would rather click on something to open/close it. I hate mouseovers doing unexpected stuff.

gil davis
02-04-2003, 01:44 PM
Definitely the bubble thing. If you add

if (event) event.cancelBubble;

inside the mouseover handler, then the parent object will not be able to collapse unless you actually mouseover it.