Restrict Right click of mouse

Last update on May 30, 2009 09:52 AM by netty5
Published by aakai1056

Restrict Right click of mouse








On your website, for protection of source code and photos, it is possible to restrict visitor from right click on your web page.


Place this script between the tags and <HEAD> </ HEAD> of your HTML code:

<SCRIPT LANGUAGE="JavaScript"> 
<! - Disable 
disableselect function (e) ( 
return false 
) 

reenable function () ( 
return trues
) 

/ / if IE4 + 
document.onselectstart = new Function ( "return false") 
document.oncontextmenu = new Function ( "return false") 
/ / if NS6 
if (window.sidebar) ( 
document.onmousedown = disableselect 
= document.onclick reenable 
) 
//--> 
</ script>


Another option is to disable right-click in each body tag:
<body onselectstart="return false" oncontextmenu="return false" ondragstart="return false" onMouseOver="window.status='..message Personal'; return true;" ..>


Note: This protection is still on, this really does not preserve your pages, as there are several ways (data at all and extremely easy as pressing two buttons on the mouse at the same time or bomb clicks rights to ... the limit, take a picture of the screen.) counter for protection.


For example, under Firefox, to work with this "protection":
Go to menu "Tools"> "Options"> "Web Features"> "Advanced" and uncheck "Disable or replace context menu".

You can also disable JavaScript or use a browser that does not support it.


Source: http://www.editorjavascript.com
Best answers for « Restrict Right click of mouse » in :
Disabling right click on your webpage Show Disabling right click on your webpage More than often, while trying so save some text or pictures from a website, you might wonder why your right click is not allowed. This is a simple JavaScript code that has been inserted in the website...
Using dictionary in Firefox with just one click ShowUsing dictionary in Firefox with just one click Search engines integrated into Firefox Installing Wiktionary Using the quick search Wiktionary Search engines integrated into Firefox Firefox has a small bar at the top right to use a...
PROBLEM 'Save Image As' ShowPROBLEM "Save Image As" Solution It may happen that when you right click on an image "Save image as" the internet explorer allow you to save images in BMP format and no other possible format! Solution The solution is to...
Moving or copying a file with your right mouse button ShowMoving or copying a file with your right mouse button Command for right mouse button Create a file in the registry Set up of the file in the registry Command for right mouse button To move or copy your document and file to another...
Download TinyResMeter ShowTinyResMeter is a tool allowing to show information system real-time. Via a right click of the mouse, you can acquire more details on the various shown fields. In more practice, it inserts a capture your screen one to safeguard important information...
Windows networking ShowNetworking in Windows 2000/XP To configure each computer, simply go to the control panel, then double-click "network connections" and right-click "local area connection", then choose properties! The local area connection window displays the...
Windows - Diagnostic tools ShowAccessing diagnostic tools On the Desktop, when you right-click on a drive and go to Properties, the "Tools" tab gives you access to three tools: Defragmenter (c:\windows\defrag.exe) Scandisk (c:\windows\command\scandisk.exe) Backup (c:\program...
Connecting several computers to a network on Windows ShowNetworking on Windows 2000/XPIn order to configure each computer, you need only go to the control panel, then double-click on "network connections", and then right-click "local network connection", and select properties! The various protocols...