|
Rank: Newbie Groups: Member
Joined: 7/27/2010 Posts: 5
|
Hello,
I would like to link a context menu to a button so that when the user clicks the button, the context menu shows below it.
I'm going to label the button "Add New" and the context menu will be used to select from a few different types of items.
I was wondering how I can manually cause the contextmenu to show and be displayed below (or near) the "Add New" button.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You will need to call this function: http://doc.essentialobjects.com/library/1/jsdoc.public.global.eo_showcontextmenu.aspxYou can call it from anywhere, for example, from your button's onclick handler:
Code: HTML/ASPX
<input type="button"
onclick="eo_ShowContextMenu(event, 'Menu1');" value="Test" />
Note you must replace "Menu1" with the ID of your context menu control. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/27/2010 Posts: 5
|
Thanks, that worked.
However, how can I position the context menu?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You don't position it. The first parameter you pass to eo_ShowContextMenu is the DOM event object. It supposes to contain information about where your mouse is. The context menu is then automatically positioned based on your mouse position.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 7/27/2010 Posts: 5
|
You are correct that it is getting the event object from the mouseclick, however the location of the context menu isnt correct.
Its appearing much further up the screen.
|
|
Rank: Newbie Groups: Member
Joined: 7/27/2010 Posts: 5
|
Actually, the positioning problem only occurs in firefox.
Any ideas? Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We are not aware of such problem. Please try to isolate the problem into a test page, we will be happy to take a look as soon as we have that.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/27/2010 Posts: 5
|
Hi, I have an example document.
How can I send it to you?
Thanks Dan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please check what version you are using. We received your sample page and tested it with the latest version and it works fine on FireFox.
Thanks!
|
|