Help - Search - Members - Calendar
Full Version: Disable Right Click
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > JavaScript
Desmater
I need the code for disabling right click, on a site. I seen some sites use this i am not sure if its js but if it is can you tell me the code. If not can you tell me what language and where to maybe find it. Thanks
Andrew
Well it's definitely javascript. But just so you know, most of the right click disable scripts don't work, since most people can just disable the javascript or use other workarounds. Like for instance if I click view source, I can just take the image or text or whatever your trying to block from being taken. I can also make a screen shot of your page and just cut the image out if I really wanted it.

But either way if your still not discouraged from using it, this site, http://www.dynamicdrive.com/dynamicindex9/index.html has a couple on it. The first three are right click disabling scripts.
Desmater
QUOTE(Desmater @ Jun 3 2008, 06:43 PM) *
I need the code for disabling right click, on a site. I seen some sites use this i am not sure if its js but if it is can you tell me the code. If not can you tell me what language and where to maybe find it. Thanks


yeah i knew there were ways around it, just wanted the mechanics and the know how. Not everyone knows the way around it too biggrin.gif
Jacob
Are you looking to secure your content? What sort of content if so? There are more options you can use.

Jacob.
bezz
Pretty much any site that uses javascript to prevent right clicking doesn't have any content worth stealing in the first place.

Paradoks
lol bezz, That may be true but you dont know about his yet.
bezz
QUOTE(Paradoks @ Jun 4 2008, 11:15 AM) *
lol bezz, That may be true but you dont know about his yet.

Would you like to make a 5 dollar bet on it?
MrTouz
Bezz made me laugh really hard, i am taking his side on this.

I think if you go to many many sites where there are protected contents, or just really good infos or what ever.. good images, they even them do not put any protections.

But again i also admit when i ever want to get an image from a sit and the right clic is disabled it pisses me opff a little coz i have to work around it. I think you can't really protect your stuff inside a website nowadays but you can try pissing off the guy that does.
Jacob
Haha. Good work bezz.

Jacob.
prixat
I've seen a ridiculous method of protection for html (Yes, really!)

All it was, were hundreds of line returns at the beginning of the page and hoping anyone viewing the page would not scroll down! laugh.gif laugh.gif laugh.gif
MrTouz
a friend of mine made a simple script, its ALERTs that pops up which you can never close until the end (or ctrl+alt+del but not many people know it) there was around 500 popups, so each time you clicked OK an other one showed up and no way to go off the page, im sure it can be altered so you get these popups once your right click... but shame for the one the does not do it in purpose tongue.gif
Jetteh22
Okay... For constructive criticism...

Google it for "javascript right click disable" or something similar..

But.. DONT DO IT.. For one main reason. IT'S POINTLESS!

Anybody who wants to steal your text content will just highlight it and press ctrl+C.. That copy's it.
Anybody who wants to steal your image content can just hit print screen and go to MSPaint and paste it in there, crop the image they want to steal out and it's theirs.

It's just pointless and very annoying as some people may want to copy and paste things to their friends, ect and that will turn them off of your site.

EDIT: Just realized trippin already said all of this. sad.gif
Andrew
It's okay creactive, I don't think anyone saw my post.
MrTouz
i did tongue.gif
innerclaw
There is a way to stop people from stealing images but someone is good they can get around that to. There some options you do to help prevent it.

You can hide your coding and/or make transparent images for roll overs but like before there is no sure way to stop people from stealing. But only hope they don't or ask them to give credit to you or copyright them.
fenerli
What are you trying to protect? Text can be put in Flash or protected PDFs/FlashPaper. Images can be watermarked and/or compressed.

Disabling right clicking is somewhat effective in that those who know how to get around it are more likely to know about copyright and more likely to respect it. On the other hand, it pisses off many users who use the right click for legitimate reasons, especially for my mouse gestures!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.