disable context menu bar in browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt

    #1

    disable context menu bar in browser

    I want to disable context menu bar in browser, and I do the following
    by copying a code in net, it is working though, but I just don't
    understand what is new Function here means, can anyone advise?
    thanks!!

    document.onsele ctstart=new Function ("return false");
  • kaeli

    #2
    Re: disable context menu bar in browser

    In article <ba8a039e.04090 20907.1fdd7543@ posting.google. com>,
    jrefactors@hotm ail.com enlightened us with...[color=blue]
    > I want to disable context menu bar in browser, and I do the following
    > by copying a code in net, it is working though, but I just don't
    > understand what is new Function here means, can anyone advise?
    > thanks!!
    >
    > document.onsele ctstart=new Function ("return false");
    >[/color]


    It just reassigns the event a new handler that does nothing at all, basically
    cancelling the event. I don't think it's cross-browser.

    Disclaimer / my 2 cents: In the vast majority of cases, doing what you're
    doing is at best a Bad Idea and at worst illegal (UK internet accessibility
    law). Most people reassign the context menu to try to keep people from
    stealing things. That's so ineffective, it's laughable, and it irritates
    legit users. The only reason you should be re-assigning the context menu is
    to provide a better one for an intranet application. Since I don't know what
    you're doing, this comment should be taken in general, not specific to you,
    so don't get your panties in a wad. ;)

    HTH

    --
    --
    ~kaeli~
    If a book about failures doesn't sell, is it a success?



    Comment

    Working...