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:30
clickfunction woes
Poster: Valdhor
Dated: Monday August 27 2007 - 21:07:03 BST
Hi
I am still evaluating Milonic menu and have come up against a javascript error when trying to use clickfunction.
My testing has now moved on to multi frame pages and getting the menu to work across frames. I have it working using mouseover but as soon as I try to get it working on clicking a menu I get a javascript error "_gm has no properties" in mmenudom.js line 16.
The aI command is:
Code:
aI("showmenu=Main Page;text=Main Page;target=actioncontent;clickfunction=openSubmenu();offfunction=closeSubmenu();");
Any info greatly appreciated.
Poster: Ruth
Dated: Tuesday August 28 2007 - 1:42:49 BST
Hi,
Are you using the frames based menu? There is a particular menu for frames [not iframes which uses the regular menu]
Anyway, I believe it contains a module that has to do with opening and closing submenus across the frames. So, I'm thinking that changing the onfunction to clickfunction may be causing the error. Have you tried instead to use what is in the frames menu and just setting the menu to openonclick=true;
Ruth
Poster: Valdhor
Dated: Tuesday August 28 2007 - 13:06:03 BST
Ruth
Thanks for the response.
Yes, I am using the frames based menu and have tried setting openonclick=true. This has no effect - I believe this is because of the way the menu operates across frames. From the example, you have to set the target and the function in the aI call to create the menu item; For example:
Code:
aI("showmenu=Support;text=Support;target=content;onfunction=openSubmenu();offfunction=closeSubmenu();");
So, I thought the way to make it open on click was to change the onfunction call to a clickfunction call...
Code:
aI("showmenu=Support;text=Support;target=actioncontent;clickfunction=openSubmenu();offfunction=closeSubmenu();");
which does make the menu open on click and everything seems to work OK. It's just that you get the error "_gm has no properties" when you click on the menu.
Poster: Ruth
Dated: Tuesday August 28 2007 - 20:16:06 BST
Hi,
I think you will have to contact Milonic about this. They would have to change the programming for the frames menu to be able to use the clickfunction in place of the onfunction, I believe. This is not something I can do since I don't know programming nor do I know how to create js functions.
Ruth