FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Disable Right Click On ANy Browser





wadja-host
hey there this is the code just copy and paste and it will do the same disable right click

Code:

<script language=JavaScript>
<!--
 var message="hey its been disabled :)";
 function click(z) {
  if (document.all) {
   if (event.button == 2) {
    alert(message);
    return false;
   }
  }
  if (document.layers) {
   if (z.which == 3) {
    alert(message);
    return false;
   }
  }
 }
 if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
 }
 document.onmousedown=click;
// -->
</script>
Peterssidan
This will only work if javascript is enabled. Disable right click will most likely irritate many visitors.
Marcuzzo
Peterssidan wrote:
This will only work if javascript is enabled. Disable right click will most likely irritate many visitors.



Yep, it may be your site, but it is the users browser.

I don't understand why somebody would want to block the context menu...

the source can allways be viewed by using the menu
snowboardalliance
Marcuzzo wrote:
Peterssidan wrote:
This will only work if javascript is enabled. Disable right click will most likely irritate many visitors.



Yep, it may be your site, but it is the users browser.

I don't understand why somebody would want to block the context menu...

the source can allways be viewed by using the menu


Yeah it's a good script if you want to irritate people or keep ignorant people from....copying and pasting I guess? I don't see the point. Might as well throw in some constant alert boxes and pop-ups, that will keep even more people away.
Star Wars Fanatic
I hate sites that do that, just to keep their images from being copied. But someone who is trying to do that will know to turn of JavaScript. the only people it hurts are the users who aren't doing anything "wrong".

Code practices like that are stupid and irritating.
thedinh
Star Wars Fanatic wrote:
I hate sites that do that, just to keep their images from being copied. But someone who is trying to do that will know to turn of JavaScript. the only people it hurts are the users who aren't doing anything "wrong".

Code practices like that are stupid and irritating.


Yes, i think that code is not necessary. i hate the website uses that code, if want to protect your code from visistor, you can encode them.
Marcuzzo
thedinh wrote:
Yes, i think that code is not necessary. i hate the website uses that code, if want to protect your code from visistor, you can encode them.


that will only slow people down of reading the source, you can't protect your source,
if you want to protect stuff you would use server-sided
Hogwarts
Marcuzzo wrote:
that will only slow people down of reading the source, you can't protect your source,
if you want to protect stuff you would use server-sided
Don't give him any ideas, he might try rendering sites server-side.
snowboardalliance
Hogwarts wrote:
Marcuzzo wrote:
that will only slow people down of reading the source, you can't protect your source,
if you want to protect stuff you would use server-sided
Don't give him any ideas, he might try rendering sites server-side.


Yeah you could just render it as Flash server side and make the site flicker continuously so it's not even easy to screen capture an image....</sarcasm>

Sorry, I feel kind of mean attacking this guy...but, disable right click...really?
Ghost Rider103
It is a pretty annoying script. Especially when you just want to copy some text to show someone something.

If they are so worried about not getting their images stolen, just put a watermark over everything. Sure it doesn't keep everyone away, but if someone is just looking to steal an image, they will probably search for one that isn't watermarked.

I haven't seen it used in quite a long time though.
Vrythramax
all this type of script does is block the context menu, it will not keep people from stealing your code. If you can view the source...everything on the page can be stolen. Sad

If you view it with your browser, it's on your computer (with the exception of scripts), all you need to do is find it.
rvec
I know a site that had it's content copied by newspapers, without quoting a source. The webmaster wasn't able to sue them because the newspaper said they didn't know they weren't allowed to copy. After this her lawyer said that making a popup when the user right-clicked would prevent the same from happening again.

I'm not sure if she just had a bad lawyer (I think she did), but this might be the reason for other websites to do the same.
thedinh
But exactly, if you protect form opening right click. the vistor can still use other method to view and the copy the content on the page.

For example: the can view page source.
HalfBloodPrince
It's nearly as annoying as those sites where you get a popup box saying "OMG PLEASE DON'T LEAVE" when you exit or navigate away and then have to kill the process.
fuhgeddaboutit
I don't get it why you want to block the contextmenu.
If I see a page that does that, I will definitely look at the source and never visit the site again.

if you don't wan't people to use your stuff... put a legal notice in it, let them copy your text and images, if you find out, you send them a mail asking them to remove it, if they don't remove it you go to court
James007
Okay okay okay! Shocked

But for those who want to do it, here's the script anyway.
the zephyrus
This is almost as bad as infinite windows, or popups that won't let you leave a page. Some things Javascript allows for convenience (keeping people from accidentally leaving an active page, introducing a new window of data, etc) but end up getting misused.

Also echoing others in saying, you can't stop people getting your content. Which would be besides the point, since, aren't you meaning to share it by posting it?
rockacola
Hogwarts wrote:
Marcuzzo wrote:
that will only slow people down of reading the source, you can't protect your source,
if you want to protect stuff you would use server-sided
Don't give him any ideas, he might try rendering sites server-side.


LOL Twisted Evil
rockacola
Disable right click was web 1.0
There's serveral ways annoying people who tries to view your source code such as AJAX, flash wrapper, code packer... etc. but no way to prevent them.. SURRENDER YOUR CODE (if they are in fact yours...) Twisted Evil
Related topics
Right click and links
do you know is it possoible to hide view source menu?
WEBSITE HELP NEEDED!
copy-controlling your website
[*CLOSED*]Out of business, please close
someone take out the TinyMCE's Right click menu![lock!]
Password Checking Please!
How to avoid people stealing your images?
Save your codes from people
secure your pictures on a web page !
Want Help from Experts in HTML
Disable Right click script in CSS ??????
What to do to prevent right click on a flash file ?
Linux file manager needed that will sum sizes of directories
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.