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:22
Menu must disappear when you click anywhere on the page
Poster: Silent1
Dated: Tuesday December 6 2005 - 17:27:20 GMT
These are the options i have,
openonclick=1;
closeonclick=1;
keepalive=1;
My client wants the menu to open when you click on a menu item and click to close it. Is there any way to keep these settings and have it so if they click anywhere on the page, besides the menu, the menu will collapse/close?
Poster: Ruth
Dated: Friday December 9 2005 - 20:06:40 GMT
Hi,
I'm not really sure since you have the keepalive=1; There were a couple of topics I found with functions that had to do with keepalive and/or closing submenus but I don't know if the functions can be used as you want.
http://www.milonic.com/forum/viewtopic.php?p=25111
http://www.milonic.com/forum/viewtopic.php?p=26924
Ruth
Poster: Silent1
Dated: Friday December 9 2005 - 21:17:57 GMT
the first link provided a function, who do i use it with the code below.
function closeAllKeepAliveMenus()
{
for(_a=0;_a<_m.length;_a++)
{
if(_m[_a][10])menuDisplay(_a,0)
}
}
aI(openonclick=1;closeonclick=1;keepalive=1;showmenu=Menu;text=Menu;url=index.html);
Thanks.
Poster: Ruth
Dated: Saturday December 10 2005 - 2:01:31 GMT
Hi,
I'm sorry, I don't know. Since you already have openonclick and closeonclick I don't think you can use clickfunction=closeAllKeepAliveMenus(); because it would close it even when you clicked the first time to open it, I think. And, you have a url=index.htm so you can't use url=javascript:closeAllKeepAliveMenus(). Those are the only ways I know to use the functions.
I'll try and see if I can find anything anywhere on how you'd use that. You might post a reply in the post with the function asking how you'd use it and posting your aI again.
By the way, the aI is incorrect. You have left out " marks
Code:
aI("openonclick=1;closeonclick=1;keepalive=1;text=Menu;url=index.htm;");
Ruth