View Full Version : multiple context menus in one page
09-03-2004, 06:32 PM
I am wondering if it is possible to have different, customized context menus in a webpage.
E.g. If you right click on a particular image in a page, you get one context menu, and if you right click on another image, you get a different context menu.
I can do this in internet explorer (after looking at a page off siteexperts.com), but I need to be able to do this in a more cross platform browser, e.g. netscape or opera.
Thanks for any help.
09-03-2004, 07:13 PM
I don't think this is possible.
I use custom context menus on my website, and if you load this page (www.afpsupport.r8.org/ie6/id2.htm) using Netscape, if you right click, the normal context menu is not disabled.
(The page will look odd anyway in Netscape, it's the IE version of my site.)
Unless we can find a way to stop Netscape/Mozilla/Opera(?) showing the context menu on right click, there's no way to show a custom context menu.
Hope this helps
09-07-2004, 11:43 AM
I was able to have multiple context menus in one page with a little help from the author of the jsDOMenu.
Using the jsDOMenu (found in menus section of dynamicdrive) you can have a context menu that shows up only in a particular region of the page. Extending this, you can define multiple menus in the jsdomenu.inc.js file, and use the onmouseover handler to call the method setPopUpMenu(whateverMenu)
So if you move your mouseover a DIV section, you can have onmouseover="setPopUpMenu(divMenu)" in the DIV tags, and when you move your mouse over an image, you can have onmouseover="setPopUpMenu(imgMenu)" in the IMG tags.
The jsDOMenu is one very nice script which can easily be extended to have multiple context menus for one page that works in netscape.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.