Lampwork Etc.
 
TrueDesign

LE Live Chat

Enter Live Chat

No users in chat


Donate via PayPal to donate@lampworketc.com

Beads of Courage


 

Go Back   Lampwork Etc. > Business as usual > Website help and critique

Website help and critique -- Get assistance with your website.

Reply
 
Thread Tools
  #1  
Old 2006-05-12, 1:23pm
Anakin's Glass Eye's Avatar
Anakin's Glass Eye Anakin's Glass Eye is offline
Boldly going
 
Join Date: Jun 22, 2005
Posts: 483
Default Disable Right Click, Stop Image Theft

If you're tired of your images showing up on Russian and Chinese web sites or web sites belonging to people/businesses with initials AH, give this a try.

There's lots of ways to disable the mouse Right-Click menu so that visitors to your web site can not "Save Image As . . ." Here's two different options you can easily add to your web pages.

Option 1, Disable Right Click Without Warning Message - this will not alert the viewer to the disable feature.

After the BODY tag on your web page, insert the following code:

<script language=JavaScript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!docum ent.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}
document.oncontextmenu=new Function("return false")
</script>

Option 2, Disable Right-Click Feature With Alert Message - an alert message box will pop up to alert the page viewer. You can change the message to say whatever you want by changing the code.

After the BODY tag on your web page, insert the following code:

<script language=JavaScript>
var message="Right Click Function Disabled!";
function clickIE4(){
if (event.button==2){
alert(message);
return false;}}
function clickNS4(e){
if (document.layers||document.getElementById&&!docume nt.all){
if (e.which==2||e.which==3){
alert(message);
return false;}}}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;}
document.oncontextmenu=new Function("alert(message);return false")
</script>

Give this a try. It is by no means foolproof but it will stop a lot of people from taking images. If you find any bugs with the code, let me know. I've added the first code to my site and it works well.

Brad
__________________
Everything that can be invented has been invented - Charles H. Duell, Commissioner, U.S. Patent Office, 1899

Many of life's failures are experienced by people who did not realize how close they were to success when they gave up. - Thomas Edison



To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Reply With Quote
  #2  
Old 2006-05-12, 2:19pm
Juln's Avatar
Juln Juln is offline
Save the Numbats
 
Join Date: Jul 23, 2005
Location: The Arctic
Posts: 577
Default

All one has to do is go to browser options, disable javascript or 'active scripting', and reload the page.
After turning off javascript, that code has no effect and the user can right click with impunity.

Also, if someone views the source of the page, they can get the image URL and download your images directly. These methods are a bit too simple to make that type of code useful.

I tend to right click for legitimate reasons like to hit 'Back' or "Bookmark This Page'. It's annoying to get a message implying that I am trying to rip the page owner off when I am in fact trying to add their page to my 'favorites'.
Reply With Quote
  #3  
Old 2006-05-12, 3:07pm
IF-Designs's Avatar
IF-Designs IF-Designs is offline
In search of her path....
 
Join Date: Jun 05, 2005
Location: North Seattle, WA (use to be Fort Wayne IN)
Posts: 7,285
Default

These is a great start thanks! and I know its not full proof anything you can do print screen and have the pic too without having to do anything but you know maybe this will help just a lil bit.
__________________

To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

Prints for sale in my
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 8:18am.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Your IP: 3.15.190.144