Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> No Right Click - Javascript, No Right Clicking Script
KoYoda
post Oct 12 2005, 06:43 PM
Post #1


Newbie [Level 2]
**

Group: Members
Posts: 29
Joined: 11-October 05
Member No.: 12,812



I made this script for disabling the right-click option. It works with all major web browsers (IE, Mozilla, Firefox, Netscape...). Just put it into the head section of your document.

QUOTE
<script language="JavaScript">

var message="Sorry, no right clicking!";

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

if (isIE||isNN) {
document.oncontextmenu=block;
}else{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=block;
}

function block(e) {
if (isN4) {
if (e.which==2||e.which==3) {
alert(message);
return false;}
}
else {
alert(message);
return false;}
}

</script>


You can edit the message wich is displayed after a user use the right-click: just edit the second line:
QUOTE
var message="Type here whatever you want...";


NOTE: This kind of script can be really annoying so use them carefully!

Cheers!


KoYoda
Go to the top of the page
 
+Quote Post
unicornrose
post Oct 12 2005, 08:36 PM
Post #2


A smile is a golden drop of sunshine for one tiny moment.
*********

Group: Members
Posts: 294
Joined: 6-March 05
From: I live near the Mouse on the Pacific Side in the US.
Member No.: 4,188



This is great but do you know that unless you also hide your code and source that people can still get your photos. I used to work for a web company in the web design department so I know all the tricks to be able to grab photos and to get ideas from sources.

You do not have to right click to look at the source in IE you just have to click on the view menu and mouse down to view source. There are tons of tricks like that. If you are trying to protect a image. Make sure you put a water mark across the whole picture that can not be removed by cropping.

Go to the top of the page
 
+Quote Post
beeseven
post Oct 12 2005, 10:45 PM
Post #3


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



Blocking right click is completely pointless. For one thing, it doesn't work in good browsers, and second, it's very easy to do anything that you'd get from right clicking by going to the menubar or using a keystroke.
Go to the top of the page
 
+Quote Post
leiaah
post Oct 13 2005, 04:20 AM
Post #4


Super Member
*********

Group: Members
Posts: 436
Joined: 21-January 05
From: Koronadal City, Philippines
Member No.: 3,358



Your pictures can still be copied even with this script. A visitor only has to click File --> Save As to copy the webpage to his computer. He can then open the folder for that page and the pictures would be there. smile.gif
Go to the top of the page
 
+Quote Post
amhso
post Oct 14 2005, 01:05 AM
Post #5


Super Member
*********

Group: Members
Posts: 426
Joined: 24-September 05
Member No.: 12,212



how do you make watermarks that can't be moved or anything, i just add some text so that people that follow an honor system will not try to remove the url.
Go to the top of the page
 
+Quote Post
Dooga
post Oct 14 2005, 03:22 AM
Post #6


Moderator
Group Icon

Group: [MODERATOR]
Posts: 1,327
Joined: 26-December 04
From: Canada
Member No.: 2,940



People like \www.weblockpro.com and \www.htmlprotector make programs that claim to hide your source. A lot more prove them wrong... A google search is the answer wink.gif
Go to the top of the page
 
+Quote Post
Brad
post Oct 14 2005, 03:30 AM
Post #7


Newbie [Level 1]
*

Group: Members
Posts: 11
Joined: 14-October 05
Member No.: 12,907



How do a lot of people with the knowledge that they have to create scripts like this, not know that you can still view others Source Codes even with the script? There's a few ways around it.
I'm not trying to embarass or 'flame,' please don't get me wrong, I'm just really curious...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Which is the best PAY-PER-CLICK (CPC) Ad-Network?(43)
  2. Auto Run Java Program(11)
  3. Could Someone Make A Php Script For Me?(3)
  4. Php Quiz Script(20)
  5. *** Click Here To Get Your Free Hosting ***(1)
  6. Free Weather Feed Script(1)
  7. Javascript Close Window(12)
  8. Adding Rows & Columns In Html Table Using Javascript(1)
  9. Watermark Your Image With Simple Php Script(34)
  10. Which Pay Per Click Pays The Most?(11)
  11. Is There Any Ad Click Service For Under 18?(8)
  12. Learn Html Quick And Easy(14)
  13. Can I Make Dynamic Menu In Php(7)
  14. Html Code Tester. Online Script(15)
  15. Background Image Swap Script(15)
  1. Invite Script..(2)
  2. Loaing Script(3)
  3. Need Help Installing Dolphin Community Script!(5)
  4. Simple Javascript And Password System(6)
  5. Do You Close The Javascript?(3)
  6. Java Vs Javascript(11)
  7. Webmail Server Script(2)
  8. Guessing Php Script(0)
  9. Adjusting Rows/cols Of Frames In Frameset Using Javascript Is Not Working In Firefox 3 Is Not Working(4)
  10. Lesser Known Useful Javascript Features(2)
  11. How To Make A View New Post Script?(5)
  12. Phpizabi Social Network Script(1)
  13. Php Guest Online Script(2)


 



- Lo-Fi Version Time is now: 26th July 2008 - 08:23 AM