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:19
I need an event when the menu is closed
Poster: Tony Fleig
Dated: Friday December 30 2005 - 12:25:01 GMT
I need to take action when my menu is closed.
I need to do it whether the menu is closed by a popdown() function call or by the user clicking on a menu item or a menu timeout or the user clicking elsewhere on the page.
Is there a way to do this? What I'm looking for is somewhere I can specify an "onmenuclose" function or something similar.
Poster: Ruth
Dated: Friday December 30 2005 - 14:54:40 GMT
Hi,
I dont' know if the following links will help.
http://www.milonic.com/menusample15.php
http://support.milonic.com/demos/
The demos have something called setTimeOut which as something to do with functions. There are a lot of functions there, soem of which can be put on pages.
Sorry, but there doesn't seem to be anyone on the forum now that does functions.
Ruth
Re: I need an event when the menu is closed
Poster: kevin3442
Dated: Wednesday January 4 2006 - 1:22:15 GMT
Tony Fleig wrote:
I need to take action when my menu is closed.
I need to do it whether the menu is closed by a popdown() function call or by the user clicking on a menu item or a menu timeout or the user clicking elsewhere on the page.
Is there a way to do this? What I'm looking for is somewhere I can specify an "onmenuclose" function or something similar.
I need to do it whether the menu is closed by a popdown() function call or by the user clicking on a menu item or a menu timeout or the user clicking elsewhere on the page.
Is there a way to do this? What I'm looking for is somewhere I can specify an "onmenuclose" function or something similar.
Hi Tony,
I haven't been on the forum for a long time, but happened to stop by tonight. This intriguing problem caught my attention. There is no such property, although it was discussed at one time. I don't know if it will eventually be implemented, but I can certainly see some good uses for an onclose property.
In the meantime, I have an idea that might work... basically constructing your own onclose event. But its execution depends on some specifics. Are you looking to fire an "onclose-like" event for any possible menus (possibly with multipe open menus at one time), just one specific menu, or multiple possible menus but only one menu open at a time?
Cheers,
Kevin
Poster: Tony Fleig
Dated: Wednesday January 4 2006 - 6:41:40 GMT
Hi. Thanks for responding.
For my application I use multiple menus with only one open at a time.
I can see this being a common requirement as more and more application logic moves to the browser as AJAX clients become the norm. In my case, I have document elements that are disabled while a menu is up and must be re-enabled when the menu has closed.
I have implemented a setInterval-based method of doing this for now, checking to see whether the a menu is visible, but it is in essence unsatisfactory as a long-term solution.
Poster: Andy
Dated: Wednesday January 4 2006 - 11:20:53 GMT
Hi All,
Just thought I'd step in here.
There are a couple of hooks you can use.
One is M_hideLayer() and the other is mmVisFunction()
The mmVisFunction() function will fire when every menu is opened and closed and passed to it are the menu object and a show/hide flag.
The M_hideLayer() function will fire when menu sets are opened and closed and passed to it are the menu object and a show/hide flag.
These functions are empty by default, all you have to do is put you're own code inside them, here's an example:
Code:
function M_hideLayer()
{
// args[0] is the menu object reference
// args[1] is the show flag - one(1) for show, zero(0) for hide
args=arguments;
window.status=args[0] + " - " + args[1]
}
{
// args[0] is the menu object reference
// args[1] is the show flag - one(1) for show, zero(0) for hide
args=arguments;
window.status=args[0] + " - " + args[1]
}
One day, I'll be able to document everything that this menu does and is capable of
Hope this helps,
Andy
Industrial Strength JavaScript and DHTML Menus
About Us
Testimonials
Contact Us
Our Distinguished Clients
Investing in Non-Profits
Where Are We
Privacy Policy
Software Licensing Agreement
DHTML JavaScript Menu
Product Information
Page Integration
Quick Reference Guides
Embedding Into a Table or DIV
Purchase
