Click to See Complete Forum and Search --> : Disabling the right click on my page


aprilskye
01-02-2003, 03:55 PM
Does anyone have a script for disabling the right click on my page to protect people from taking code or pictures off my site? Thanks!

jeffmott
01-02-2003, 04:12 PM
There are plenty of previous threads regarding this. You can search for them.
http://forums.webdeveloper.com/search.php?s=&action=showresults&searchid=8586&sortby=lastpost&sortorder=descending

Understand though that disabling right click will NOT protect your code and pictures.

Charles
01-02-2003, 04:26 PM
At least once a week, it seems, somebody asks this question. But never have I seen anyone ask how to defeat these 'no right click' scripts. They all figure it out on their own.

aprilskye
01-02-2003, 04:53 PM
The main reason I want to disable a right click on my pages is not so much for source, but to somewhat deter people from stealing my pictures and using them on their websites or using my pictures for their own identity. Ok, it sounds weird, but its happened quite a few times. The source I don't care too much for...its the pictures I worry more about.

pyro
01-02-2003, 06:17 PM
It is absolutly impossible to protect you pictures. Anyone with a screen capture program can get them no matter what you try to do to stop it. Also, many image programs are capable of screen capture, I know PSP7 is...

jeffmott
01-02-2003, 06:39 PM
pyro
many image programs are capable of screen capture, I know PSP7 is

As is Windows. All you need do is press the "Print Screen" button.

Christ
01-03-2003, 06:54 AM
No right mouse click



<script language="javascript">
function noRightClick() {
if (event.button==2) {
alert('You can NOT Right-Click on this page -- but you CAN Left-Click.')
}
}
document.onmousedown=noRightClick
</script>

pyro
01-03-2003, 07:32 AM
Or this one. http://www.dynamicdrive.com/dynamicindex9/noright2.htm which only disables it on images. Once again, you aren't going to be protecting them, just delaying people from getting them for about a second...

Christ
01-03-2003, 07:37 AM
All anyone has to do is disable JavaScript on IE and none of your JS will work