I have a website which displays a lot of photos. I'm looking for a good way to create a custom menu which will display whenever a user right-clicks on a photo. Once the user makes a selection I'll need to run some javascipt and/or c# code to process their selection. I've already tried using Jquery but while it works in firefox it doesn't work in IE7 or IE8.

>I've already tried using Jquery but while it works in firefox it doesn't work in IE7 or IE8.

Check this sample.

Hi try this for cross browser support.

Context menu with jQuery

You can bind context menu with jquery as below

$("#test").bind("contextmenu",function(e){
              e.preventDefault();
              $("#menu").css({top:e.pageY+"px",left:e.pageX+"px"}).show(100);
            });

where #menu is will be with html you want to show in context menu. There are some jquery plugin also. if you want any working example for this than try this post.

You will be able to download working code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.