473,789 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to disable mouse's right click and scroll bar

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
4 2466
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:(fun ction(w){for(va r%20i=0;i<w.len gth;i++){argume nts.callee(w.fr ames[i]);}try{function %20n(r){r.oncli ck=r.oncontextm enu=r.onmousedo wn=r.onmouseup= null;}n(w.docum ent);n(w.docume nt.body);}catch (e){alert('Book marklet%20faile d:\n\n'+e.messa ge);}})(top);

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 20 '05 #2
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:(fun ction(w){for(va r%20i=0;i<w.len gth;i++){argume nts.callee(w.fr a
mes[i]);}try{function %20n(r){r.oncli ck=r.oncontextm enu=r.onmousedo wn=r.onmou
seup=null;}n(w. document);n(w.d ocument.body);} catch(e){alert( 'Bookmarklet%20 f
ailed:\n\n'+e.m essage);}})(top );
--
Randy


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

Tim
Dec 20 '05 #3
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:(fun ction(w){for(va r%20i=0;i<w.len gth;i++){argume nts.callee(w.fr a
mes[i]);}try{function %20n(r){r.oncli ck=r.oncontextm enu=r.onmousedo wn=r.onmou
seup=null;}n(w. document);n(w.d ocument.body);} catch(e){alert( 'Bookmarklet%20 f
ailed:\n\n'+e.m essage);}})(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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 20 '05 #4
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)cybers pace.org | don't, I need to know. Flames welcome.
Dec 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3169
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled href="#">bahbahbah</a> Does not work, as it is still clickable. It only changes the color to grey.
1
3434
by: jv | last post by:
I have quite a few of continuous form and subform where I do allow scroll bars. I run into problems with the mouse wheel whenever the data on the form does not take up the whole page. In this instance, whenever a user uses the mouse wheel to scroll down, the first record disappears off the screen and they can't get it back unless they click on the Refresh button or Page Up. The mouse wheel never scroll back up to the first record. ...
1
3336
by: nicholas | last post by:
Hi, If on an asp.net page the user has just selected a value in a dropdownlist and scrolls with the wheel of his mouse, the selected value of the dropdownlist will change. How could I avoid this. So how could I disable the mouse scrolling that dropdownlist. Or how could I disable the mouse-scroll on those pages.
0
1743
by: Al | last post by:
Hi I like to replace a character at the click of mouse. My main problem is when I click on the characters that need to be changing the richTextBox will scroll up make it very distracting. Is there anyway that I can disable scrolling? Here is what the simple code aRichtext.Text = aRichtext.Text.Remove(position, 1) aRichtext.Text = aRichtext.Text.Insert(position, "N") aRichtext.Select(position, 1)
19
5943
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up the page but I find that the iframes interfere with the getting the mouse coords from the screen which is essential in moving the scroll bar around. My test html is given below. With the iframe hidden the mouse coords are obtainable. With the...
14
3774
by: Amar | last post by:
Hi All, I am a newbie to PHP and have the task to create a page using PHP where in that page I need to disable all key operation as well as mouse operation even also the menu operation that means printscreen. I have only the java script code for mouse right click disable but that does not allow me to disable to do ctrl+c. So I need some help that can solve my task. Waiting for your replies. Thanks,
9
812
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? ----------------------------------------------------------------------- The oncontextmenu intrinsic event is the only safe and reliable method. Of the other approaches often presented, most depend on an alert box interrupting the process and rarely work. Note that oncontextmenu is a non-standard event and is not...
1
3210
by: kallol | last post by:
I have a simple HTML page where I have a form with in a <div style="height: 600px; width: 100%; overflow: auto;">. The mentioned div styles are mandatory to get the expected behavior of the div. Now, in Firefox, the page appears properly as expected. I can scroll down and up the div part by dragging the scroll bar by mouse and I can scroll down and up the div part by rolling up and down the mouse wheel as well. But I am facing the problem...
5
1512
by: Filips Benoit | last post by:
Dear All, Opening a access-interface it first show company-news that the user should read. The text is shown line by line on a black background and is read from a txt-file that I update every day. The tekst is rolling if it is longer than 55 chars. Right from the text there is a Command-button that imports the next line On_Click. The user can click it or press ENTER (since it is the only tab-controle).
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.