Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:03

Closing a menu that has keepalive=1


Poster: Speednet
Dated: Thursday November 25 2004 - 3:34:35 GMT

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!


Poster: Speednet
Dated: Friday November 26 2004 - 5:46:46 GMT

Bump: I still need help!


Poster: Andy
Dated: Monday November 29 2004 - 13:25:54 GMT

Hi,

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


Code:
function closeAllKeepAliveMenus()
{
   for(_a=0;_a<_m.length;_a++)   
   {
      if(_m[_a][10])menuDisplay(_a,0)
   }
}


Hope this helps
Andy


Poster: Speednet
Dated: Monday November 29 2004 - 17:43:54 GMT

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