How to disable mouse's right click and scroll bar

Discussion in 'Javascript' started by hon123456, Dec 20, 2005.

  1. hon123456

    hon123456 Guest

    Dear all,

    I want to disable the mouse's right click and the scroll
    bar. What is the javascript to do that?

    Thanks
     
    hon123456, Dec 20, 2005
    #1
    1. Advertising

  2. hon123456

    Randy Webb Guest

    hon123456 said the following on 12/19/2005 10:08 PM:
    > Dear all,
    >
    > I want to disable the mouse's right click and the scroll
    > bar. What is the javascript to do that?


    There isn't any. Leave my @%@!#$ mouse alone!!!

    javascript:(function(w){for(var%20i=0;i<w.length;i++){arguments.callee(w.frames);}try{function%20n(r){r.onclick=r.oncontextmenu=r.onmousedown=r.onmouseup=null;}n(w.document);n(w.document.body);}catch(e){alert('Bookmarklet%20failed:\n\n'+e.message);}})(top);

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Dec 20, 2005
    #2
    1. Advertising

  3. hon123456

    Tim Guest

    "Randy Webb" <> wrote
    > > Dear all,
    > >
    > > I want to disable the mouse's right click and the scroll
    > > bar. What is the javascript to do that?

    >
    > There isn't any. Leave my @%@!#$ mouse alone!!!
    >
    >

    javascript:(function(w){for(var%20i=0;i<w.length;i++){arguments.callee(w.fra
    mes);}try{function%20n(r){r.onclick=r.oncontextmenu=r.onmousedown=r.onmou
    seup=null;}n(w.document);n(w.document.body);}catch(e){alert('Bookmarklet%20f
    ailed:\n\n'+e.message);}})(top);
    >
    > --
    > Randy


    How erudite, well said. That 'll teach 'em.
    Nice bookmarklet also.

    Tim
     
    Tim, Dec 20, 2005
    #3
  4. hon123456

    Randy Webb Guest

    Tim said the following on 12/20/2005 1:54 AM:
    > "Randy Webb" <> wrote
    >
    >>>Dear all,
    >>>
    >>> I want to disable the mouse's right click and the scroll
    >>>bar. What is the javascript to do that?

    >>
    >>There isn't any. Leave my @%@!#$ mouse alone!!!
    >>
    >>

    >
    > javascript:(function(w){for(var%20i=0;i<w.length;i++){arguments.callee(w.fra
    > mes);}try{function%20n(r){r.onclick=r.oncontextmenu=r.onmousedown=r.onmou
    > seup=null;}n(w.document);n(w.document.body);}catch(e){alert('Bookmarklet%20f
    > ailed:\n\n'+e.message);}})(top);
    >
    >>Randy

    >
    >
    > How erudite, well said. That 'll teach 'em.
    > Nice bookmarklet also.


    I can't take credit for the bookmarklet. Only for having/sharing it. If
    my memory serves correctly (It may not), the bookmarklet was written by
    Richard Cornford although it may have been Lasse Reichstein Nielsen. I
    have had it for a while, it is on my toolbar :)

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Dec 20, 2005
    #4
  5. Randy Webb <> wrote:

    > There isn't any. Leave my @%@!#$ mouse alone!!!


    Agreed. If nothing else, it renders Opera's glorious mouse gesture
    functionality inoperative.

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
     
    Christopher Benson-Manica, Dec 20, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: How to disable right click mouse??

    Kevin Spencer, Jul 24, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    562
    Kevin Spencer
    Jul 24, 2003
  2. Matt
    Replies:
    0
    Views:
    3,550
  3. John Hann
    Replies:
    0
    Views:
    6,082
    John Hann
    Aug 21, 2004
  4. Matt
    Replies:
    9
    Views:
    70,851
  5. Matt
    Replies:
    9
    Views:
    549
    kaeli
    Aug 23, 2004
Loading...

Share This Page