SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
Thread: No right click code
-
Oct 14, 2000, 07:18 #1
- Join Date
- Sep 2000
- Location
- UK - Yorkshire
- Posts
- 62
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
To stop people from right clicking on your web pages and lifting your pics use this code
_______________________________
<script LANGUAGE="javascript">
// No rightclick script
var bN = navigator.appName;
if (bN=='Microsoft Internet Explorer')
function click() {
if (event.button==2) {
alert('Feature Disabled')
}
}
document.onmousedown=click
</script>
______________________________
Hope this is useful for someone
-
Oct 14, 2000, 07:49 #2
- Join Date
- Aug 1999
- Location
- East Lansing, MI USA
- Posts
- 12,937
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It can't stop them from opening your page source, finding the picture filename, and then saving it.
Or just turning off their Javascript and then saving it.
Chris
-
Oct 14, 2000, 08:01 #3
- Join Date
- Sep 2000
- Location
- UK - Yorkshire
- Posts
- 62
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thats true, but it's enough to put off the novice and a large percentage of the population Chris. Besides you don't have to use it if you don't want to!
-
Oct 14, 2000, 08:06 #4
- Join Date
- Jan 2000
- Location
- Charlotte, NC
- Posts
- 5,891
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
When amateur webmasters try to be "hip" and "advanced" by putting that ridiculous disabling of being able to right click, it really annoys me. I mean, who are they fooling? Anyone who knows anything knows you can just go to View > View Source in IE. If this was really necessary, would any of the web's most popular sites use it?
-
Oct 14, 2000, 08:12 #5
- Join Date
- Oct 2000
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I always get round this by holding down the right mouse button, pressing enter to dismiss the box and then releasing it.
-
Oct 14, 2000, 08:22 #6
- Join Date
- Sep 2000
- Location
- UK - Yorkshire
- Posts
- 62
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Like I said Marc I was only trying to help those who thought it might be useful, you don't have to use it. Oh and thanks for calling me an "amateur". I wasn't trying to be hip or professional, only helpful, which is the whole point of this forum. If you don't have anything constructive to say - don't bother!
-
Oct 14, 2000, 10:56 #7
- Join Date
- Jul 1999
- Location
- A cave with 47 computers and an internet feed
- Posts
- 3,559
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Let's try to keep the tone a little more civil in here.
Nobody is calling anyone an amateur, and I believe Marc was just making a broad generalization by saying that the code is not often used on professional sites.
Ian, I'm certain that your contribution will be most helpful for anyone looking to block a large percentage of visitors who might otherwise steal source code and graphics.
Thank you for donating the code to our members!
Sherice Jacob - Web Improvement Expert
Improve Website Conversions | eBook Covers
Follow Me on Twitter!
-
Oct 14, 2000, 14:24 #8
- Join Date
- Jul 1999
- Location
- California USA
- Posts
- 1,071
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ian, I have dealt with many photographers and I have used an "Image Right Click Disabler" as it gives them a sense of security, although false sense I will admit. Please Note - This disables 'right click' for images only, not entire right click functions such as print & refresh.
Even though it won't prevent everyone from taking their images, it will at least deter some...and for photographers that is what they feel comfortable with. But not all will agree with me...view "This Thread" or "This One" and you can see how this was discussed before & how SP Members commented on this issue.
Of course I give photographers the pros & cons about this feature, how it is not fool proof, how you can still access the images if you know how and I emphasize that that the best way to protect their images is to include watermarks. Disabling the right click, whether an image only or the entire page, will most definitely be a limitation...as some may just 'click away' from your site if they are unable to use this function of their browser.
Ian, our forums are here to discuss all aspects of web design and you will find a wide range of opinions in which not everyone will agree. We pride ourselves to be a learning center for everyone. So we do value your contribution as your code may be just what someone is looking for...
Dlynn :: SitePoint Senior Advisor ::
PawPrint Designs by WebKat
"Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly
-
Oct 14, 2000, 16:16 #9
- Join Date
- Jan 2000
- Location
- Charlotte, NC
- Posts
- 5,891
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Ian
Like I said Marc I was only trying to help those who thought it might be useful, you don't have to use it. Oh and thanks for calling me an "amateur". I wasn't trying to be hip or professional, only helpful, which is the whole point of this forum. If you don't have anything constructive to say - don't bother!
-
Oct 14, 2000, 22:21 #10
- Join Date
- Aug 1999
- Location
- Pittsburgh, PA, USA
- Posts
- 3,910
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It serves SOME purpose - your average surfer doesn't necessarily think to find a way around it...it'll deter the petty little thieves out there. So it has some worth...I do agree that it's highly annoying, though.
-
Oct 15, 2000, 08:52 #11
- Join Date
- Sep 2000
- Location
- UK - Yorkshire
- Posts
- 62
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No offense taken, I was just blowing off some steam (bad day)
-
Oct 15, 2000, 09:37 #12
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Ian,
From a quick glance, your code only works for IE. I'm sure one of the threads WebKat posted has the code for NN.
Since others have already mentioned that noRightClicks do not ultimately work, I will only add that at a while back I saw a script at javacripts.com that incorporated dHTML with the noRightClick. Essentially, when you rightClicked, an order form popped up, listing prices for the photographs that were displayed on the page.
In my opinion, it was the best, and possibly only, valid use for a noRightClick script I had ever seen.
One final comment: as an individual who is often asked to help people with code, I refuse to do so if there is a noRightClick script in place -- especially since the majority of people who have them in place, usually have cut&paste scripts on their sites.
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Oct 15, 2000, 13:22 #13
- Join Date
- Jul 1999
- Location
- California USA
- Posts
- 1,071
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Vincent Puglia
...when you rightClicked, an order form popped up, listing prices for the photographs that were displayed on the page. In my opinion, it was the best, and possibly only, valid use for a noRightClick script I had ever seen.
Here is where I found the script for Protecting Images that I mentioned and other information regarding using this option on your website. Including a CGI-Script for Image Protection...
"Right Click Disabler" for 4.0+ Browsers attempts to prevent users from right-clicking the page and viewing your page source - and any other feature of browser's right click.
AND to repeat the disclaimers that have been repeated before, "As Described Here" by Martin Web, "Scripts from JavaScript.com" explains how these script are not foolproof - such as won't stop a MAC one-button mouse.
If this is what you want to have accomplished, try the scripts and decide what is best for your website - just know the limits beforehand...
Dlynn :: SitePoint Senior Advisor ::
PawPrint Designs by WebKat
"Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly
Bookmarks