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:15

Close submenu after mouse click


Poster: beerens
Dated: Wednesday February 8 2006 - 20:13:01 GMT

Hello,

I have a website with a horizontal menu and some vertical submenu's. -see also http://www.antonbeerens.e-hosted.nl/index.php

The page uses a Iframe for the content. At the moment after I click on a submenu the page is loaded into the Iframe but the submenu stays open. Is it possible to automatically close it after a mouse click?

It is just a minor issue and I am very happy with the menu!

Kind regards,
Anton Beerens


Poster: Migru
Dated: Wednesday February 8 2006 - 22:12:47 GMT

Hi


When I started your page

http://www.antonbeerens.e-hosted.nl/index.php

it was impossible for me in IE 6.2 to keep a sub open, even the second level subs closed, when the mouse pointer left the menu.

However, in FF 1.5 I confirm, some subs closed only, when I clicked outside the iframe area. It seems to be an "old" FF bug. As far as I know it is not a matter of the menu. Mail to FF !!!

This is not to discourage or to frustrate, but - if possible - try to open your page with OPERA 8, the submenus are even not visible there. We have to wait for Opera 9, (as far as I´know, it will be improved there).

Did not test any other browser.

Michael

Please see
http://www.milonic.com/itemproperties.php
"closeonclick"


Poster: Ruth
Dated: Thursday February 9 2006 - 1:28:56 GMT

Hi,

You also need to upgrade to the newest version, 5.742.

Ruth


Poster: beerens
Dated: Thursday February 9 2006 - 7:33:30 GMT

Thank you for the replies. I have checked but when I click on the link it opens the site correctly. I have no idea what is going wrong.

I will update the menu to the latest version and play with the closeonclick funtion. I am sure I will be able to solve it now.

Kind regards,
Anton Beerens


Poster: Ruth
Dated: Thursday February 9 2006 - 14:02:12 GMT

:oops: Sorry, that's my fault, I noted the problem and edited the link, it was the period and ) after it that was acting like part of the link.

Ruth


Poster: Migru
Dated: Thursday February 9 2006 - 15:37:25 GMT

Hi again

The drawMenus() should be the final statement of the main_menu script section, and the home sub should be included in the menu_data.js.
This possibly could improve your closemenu - performance.
The drawMenus() then, within own <script> tags would be unnecessary.

Michael


Poster: beerens
Dated: Thursday February 9 2006 - 23:07:22 GMT

Hi,

I have tried the following without any succes.

- Updated to 5.742
- Tried to set closeonclick=true
- Tried to use closeallonclick=true
- Tried Openonclick=true and that worked. Now I had to click on a menu item before the submenu was opened...

Neither of them will close the submenu when I click on it. I have searched the forum but it seems to be a known problem when using IFrames.

__at__ Migru The home submenu is made with a piece of PHP code. This to show a login or logout menu. That is why the menu part is broken into three script parts. But I tried to remove the php code and still no luck.

One person seemed to get it to work http://www.milonic.com/forum/viewtopic. ... oseonclick will try this tomorrow or maybe someone else know something else to try.

Kind regards,
Anton Beerens


Poster: Migru
Dated: Friday February 10 2006 - 0:43:52 GMT

Hi

Well, we should distinguish between this actual issue and the discussion we had before FF 1.5 was introduced.
Before FF 1.5. it was worse than it seems to be actually, because for instance the melonic sample page

http://www.milonic.com/menusample.php?sampleid=11

had obviously that problem too and in fact I´m unable to reproduce it there now.

I´m using IFRAMES and a horizontal menu bar in a table cell, with vertical submenus similar like you do (not php), just on top of such an inline frame. - and have the problem with OPERA as everyone has using iframes. (That was for me the reason for an additional treemenu in my dhyg-pages)

http://www.dhyg.de/

but with FF 1.07 I had the problems, see the discussion/posts:

http://www.milonic.com/forum/viewtopic.php?p=32953&highlight=#32953

particularly the final post there! But after those posts/discussion everyone considered this as solved with the installation of FF 1.5. And for me, it is the main reason, that, whatever (in html pages, JavaScript) deviates from standard recommended settings (i.e. placement of drawMenus(), arrangement of referencing of files etc. and such things) then of course makes me suspicious... and it seems to be very certain, that in this regard, there is not much space for experiments.


Michael


Poster: beerens
Dated: Friday February 10 2006 - 7:34:04 GMT

Hi,

I am not sure if I have explained my problem properly. In the example : http://www.milonic.com/menusample.php?sampleid=11 if I click on "Links opened in IFrame" and then on any of the submenu's the content is loaded into the IFrame. However after I have clicked on the submenu (ea "Apache web server") I want the menu to be closed. Now I have to move the mouse away from the menu before it will be closed.

My menu does exactly the same as yours on your site. It stays down after a mouse click :) Still thanks for your reply.

Kind regards
Anton Beerens


Poster: Migru
Dated: Friday February 10 2006 - 7:41:04 GMT

Hi, good morning

OK got it. It should immediately close after the mouseclick.

M.


but my observations in your menu are e.g.

hover Sponsoren (Main) and click
again Sponsoren (in the sub) then
Sponsor commissie

repeat

the menu not always closes, when leaving it. (FF only)
Is this only in my browser - installation here ??

Michael


Poster: beerens
Dated: Friday February 10 2006 - 10:01:29 GMT

Hmm that is something I haven't checked in FF. Lucky enough most of my visitors are IE, but I will check it.

Thanks!


Poster: Migru
Dated: Friday February 10 2006 - 10:19:42 GMT

Hi there

stunning, and again noticing that the correct communication is of vital importance! There was obviously a misunderstanding in the beginning.

So far, I´ve considered the "closeonclick" problem as the minor issue, whereas I considered the -not-closing-when-leaving-the-menu- as the major problem !

(This is because originally FF didn´t close at all in version 1.02, when iframes were in the game)

Michael


Poster: beerens
Dated: Friday February 10 2006 - 10:34:45 GMT

I agree communicatation is very important with such matters. What is clear for me does not mean is is clear for everyone else :) sorry about that.

Hmm sounds like a big issue the menu's that does not close at all. Maybe a stupid question but has anyone tried to make a workaround with some javascript? I assume the onclick on the page can be triggered and in that event call the closeAllMenus() ??

Anton


Poster: Migru
Dated: Friday February 10 2006 - 10:58:48 GMT

Anton,

i will take it up on the agenda very soon, at the moment I´m busy with some other issues.

(I think I will request Milonic for support)
By the way, and as you are using iframes, look at

http://www.milonic.com/forum/viewtopic.php?t=7137
(first post)

Michael