Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8960729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:43:28+00:00 2026-06-15T15:43:28+00:00

Ok so as far as I understand it so far we have 2 approaches

  • 0

Ok so as far as I understand it so far we have 2 approaches

Firstly some javascript which I can employ within a given script. But this switches right click off for everything.

window.oncontextmenu = function() {
        return false;
};

or in the html can code

<body oncontextmenu="return false;">

but I cannot thus far find anywhere that will give me javascript or jquery solution where I can apply this to a given selector. Is this simply not possible or am I mis-understanding something.

I am finding that on a single right click my submenu appears immediately followed by the browser’s default menu. The only way I have found to suppress this is setting oncontextmenu to false. Is there a more refined solution?

Further Note to accepted answer

Also applied successfully on a dynamic menu using delegate:

$(document).on("contextmenu", "#existing_Flavours .field_Input_Left.flavour", function(){
        return false;   // suppress browsers default right click menu
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:43:29+00:00Added an answer on June 15, 2026 at 3:43 pm
    $('#mySelector').on('contextmenu', function(){
      return false;
    });
    

    Just bind it like you would any other event…

    However, if you’re wanting to do this to “protect” content, it’s very little security. It’s easy to bypass.

    Demo: http://jsfiddle.net/V3sWc/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far I can understand HTML.ActionLink and URL.RouteURL but still trying to absorb where
I've been researching this problem I have and I can't seem to understand it
As far as I understand from the documentation the QUdpSocket are async but, still,
As far as I understand the branch-on-sign is the name of some kind of
I have a problem I tried solving on my own, but didn't get far
So far I have tried two approaches: -1. Add to web.xml: <session-config> <tracking-mode>COOKIE</tracking-mode> </session-config>
Im currently having trouble trying to understand linked lists. I have some code that
I realize this is way too far into the micro-optimization area, but I am
As far as I understand Facebook allowes you (through the API) to post on
As far as I understand, https is http plus SSL/TLS. What do I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.