Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Right Click Menu in IMG --> MAP --> AREA --> Coordinates

    Hello there,

    I am facing a tricky situation. Let me explain it :-)

    I created a IMG tag with that pointing to a bitmap file.

    Now i created a MAP tag and inside that did the AREA tag and defined certain coordinates that's clickable to user. User can click and inside the "onclick" i defined a JS function that gets triggered. Upto this part everything is working awesome.

    The challenge now is, i want to be able to show a custom defined menu when user right click on the coordinates inside the image. How can i do that?

    Left click is handled inside "onclick", but how about right click?

    Is that possible to do? If yes, how?

    Thanks in advance.

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    Right click is almost entirely taken over by browser functions, so it's pretty confusing to use it. You might consider the menu showing onmouseover, and disappearing onmouseout.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #3
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you have a sample code that creates a menu? I am pretty new to HTML and have no idea.

    Thanks

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,899
    Thanks
    15
    Thanked 226 Times in 226 Posts
    Quote Originally Posted by donguy76 View Post
    Do you have a sample code that creates a menu? I am pretty new to HTML and have no idea.

    Thanks
    Alas, I don't, it's not something I've needed to use. But a list type menu styled inline should work well for the HTML. The JS has to set the style to display:block;visisbilty:visble or display: none;visibility:hidden; and to position it on top of the area.

    BTW, you might want to change that bitmap to a png or jpg to reduce the file size.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.


  •  

    Posting Permissions

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