Closing a menu that has keepalive=1

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Speednet
Super Advanced
Super Advanced
Posts: 33
Joined: Thu Nov 25, 2004 4:29 am

Closing a menu that has keepalive=1

Post by Speednet »

I did a lot of searching for an answer on this forum, and it seems that the question was asked many times, but no answer was ever given.

I have a menu that was opened with keepalive=1, so that it will not automatically close when the user moves the mouse away.

I want to programmatically close the menu after it's been opened.

I have tried using closeAllMenus() and popdown(), but apparently they do not work with a menu that has keepalive=1.

There is obviously SOME way to do it, but I can't find it. Can someone please provide a snippet of code to close such a menu?

Thanks!
Speednet
Super Advanced
Super Advanced
Posts: 33
Joined: Thu Nov 25, 2004 4:29 am

Post by Speednet »

Bump: I still need help!
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Closing menus that have been opened using the keeplive property can be achived with the following function:

Code: Select all

function closeAllKeepAliveMenus()
{
	for(_a=0;_a<_m.length;_a++)	
	{
		if(_m[_a][10])menuDisplay(_a,0)
	}
}
Hope this helps
Andy
Speednet
Super Advanced
Super Advanced
Posts: 33
Joined: Thu Nov 25, 2004 4:29 am

Post by Speednet »

That was exactly what I was looking for, thanks!!
Post Reply