By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

How to disable mouse's right click and scroll bar

P: n/a
Dear all,

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

Thanks

Dec 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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[i]);}try{function%20n(r){r.onclick=r.oncontextmenu=r .onmousedown=r.onmouseup=null;}n(w.document);n(w.d ocument.body);}catch(e){alert('Bookmarklet%20faile d:\n\n'+e.message);}})(top);

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 20 '05 #2

P: n/a
Tim
"Randy Webb" <Hi************@aol.com> 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[i]);}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
Dec 20 '05 #3

P: n/a
Tim said the following on 12/20/2005 1:54 AM:
"Randy Webb" <Hi************@aol.com> 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[i]);}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/
Dec 20 '05 #4

P: n/a
Randy Webb <Hi************@aol.com> 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.
Dec 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.