Context Right Click Menu visible forever

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Kees
Beginner
Beginner
Posts: 3
Joined: Mon Aug 07, 2006 9:14 am
Location: Netherlands

Context Right Click Menu visible forever

Post by Kees »

In case I use the Context Right Click Menu and I click the right mousebutton, the context menu appears and clicking on a menu item everything works exelent. However, in the case I choose for not selecting an item I have the folowing problem:
The Context Right Click Menu disappears only after hovering over the menu itself and moving then outside the menu. When I move the mousepointer away from the context menu without first going inside the menu it stays there forever until I move the pointer in and out the menu. Does an option exist that closes the contect menu in the case I do not click on it or hover over it and move away with the pointer?

Kees
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I don't know of anything that will do that. However, you could use a function and put either an item that says Close, or an item with a little X image in it.

The function would go in the data file for the context menu, up by the top

Code: Select all

function mm_closeClickedMenu() 
{ 
  menuDisplay(_mi[_itemRef][0], 0); 
} 
Then in the item, you'd have

Code: Select all

aI("text=Close Menu;url=javascript:mm_closeClickedMenu();"); 
Or if you had an image, you'd have it set up as

Code: Select all

aI("image=close.gif;imagealign=right;imagepadding=2;itemwidth=whatever you want for width;url=javascript:mm_closeClickedMenu();"); 
Of course you'd set the image where you want it, and whatever padding and itemwidth and height.

Hope this helps.

Ruth
Kees
Beginner
Beginner
Posts: 3
Joined: Mon Aug 07, 2006 9:14 am
Location: Netherlands

Post by Kees »

Thanks, this works and helps the user that lost his way.
Is there also a possibility for a kind of 'menuCloseDelay' option?

Kees
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

As far as I know it would use the menuCloseDelay in the menu_data.js file.

There is also a dynamic right click context menu. This was done for a user who wanted to have different context menus depending on whether the person right clicked on the page, or right clicked on a link. On a link the context menu includes open and open in a new window.

http://support.milonic.com/demos/toggle ... /index.htm

If you download this, make sure you download the contextmenu.js since this is not included.

Ruth
Post Reply