Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  akansha 11 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    context Menu Posts
  • context Menu #6133

    akansha
    Member

    I am using Context menu . Everything is working fine other than disabling the default browser’s context menu.

    The problem is I am opening the html page from .net on top of .ascx page. May be because of that below mentioned code is not working

    // disable the default browser’s context menu.

    $(document).bind(‘contextmenu’, function(e) {

    return false;

    });

    when on console i write $(document), the value is coming as null.

    but if i check for document, it returns #document . PFB, the code I copied from console.

    $(document)

    null

    document

    #document

    $

    bound: function () { return document.getElementById.apply(document, arguments) }

    any idea why this is happening

    One more question, We are planning to buy the licences , but we  have already started real time coding on the trail code. I am hoping we would not need to change any code once we shift to licensed code.

    Thanks & Regards,

    Akansha

    context Menu #6135

    akansha
    Member

    may be above code it not very clear:
    but if i check for document, it returns #document . PFB, the code I values i am getting from firebug or from console.

    $(document) = null

    document= #document

    $= bound: function () { return document.getElementById.apply(document, arguments) }

    context Menu #6136

    Peter Stoev
    Keymaster

    Hi Akansha,

    There are additional options for disabling the default browser’s context menu:

    1. http://www.javascripter.net/faq/rightbut.htm
    2. Capture the onContextMenu event, and return false in the event handler.

    Example:

    $(document).ready(function(){ 
    document.oncontextmenu = function() {return false;};
    $(document).mousedown(function(e){
    if( e.button == 2 ) {
    alert('Right mouse button!');
    return false;
    }
    return true;
    });
    });

    You don’t have to make changes in your code after purchasing a license. However, make sure that you are using the latest available version.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    context Menu #6137

    akansha
    Member

    It works!! ..Thanks a ton!
    I have version 2.1. I will install 2.3.
    Do have any plans to give gallery plugin in near future with search and filter option??

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.