Results 1 to 3 of 3

Thread: multiple context menus in one page

  1. #1
    Join Date
    Sep 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question multiple context menus in one page

    Hi,
    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.

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't think this is possible.

    I use custom context menus on my website, and if you load this page 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
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Sep 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey all,

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •