HTML Help Central . com

» Online Users: 70

0 members and 70 guests
No Members online
Most users ever online was 695, 02-16-2011 at 07:01 AM.

» Site Navigation

 > FAQ

» Domains For Sale

Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2005

    Post JavaScript No-Right Click

    For the many people who come to our forum asking for a no-right click script to deter your website from leechers, here is the best one that is cross-browser compatible: (Copy and paste this between the <head> </head> of your page)
    <script type="text/javascript"><!--
    var message="";
    function clickIE() {if (document.all) {(message);return false;}}
    function clickNS(e) {if 
    (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {(message);return false;}}}
    if (document.layers) 
    document.oncontextmenu=new Function("return false")
    However, I would like to point out that there is not a single script in the world that can really stop people from downloading stuff off the website. Yup, there is always a way to save pages AND the contents.

    "This script is *NOT* fool-proof. People can disable JavaScript support in their browser, use a browser which doesn't support JavaScript, or use a browser to link directly to the image that you want to protect. Also the pages and images are normally stored in the user's browser cache (for viewing later whilst offline) - with a little bit of work, the thief could find your image in their cache. It also doesn't stop users accessing the source of your page from the toolbar menus (View | Page Source). You could attempt to load your page into a window without toolbars - but again this isn't fool-proof. They can access the page directly, with toolbars, instead of opening it without them as you intended. There is a tool for Microsoft Internet Explorer 5 that will encrypt JScript code - but this is only supported by Microsoft Internet Explorer 5 - and will not allow the scripts to run on any other browser.

    If you require to protect your images and or your scripts then don't use it and don't put your images/scripts on the net. If your livelihood relies on people not copying your images - then add a water mark or "sample" stamp to your images."
    Besides, disabling right-click may render your site inaccessible to left-handed people:
    Originally posted by starla
    In addition to being completely worthless as a means of security, disabling right-click also makes it impossible for many people to use your site at all. Some browsers use the right mouse button as a means of accessing your information. Without it, your page may be rendered completely inaccessable to many users. Left handed people sometimes reverse the function of their mouse buttons so that the right button is used to click links. On a page where the author has attempted to interfere with right clicks, those users will not be able to navigate.
    Below is a list of currently known ways to deter people, and how to bypass them.

    Methods to protect web page code, and the methods to bypass them:

    1) No right-click: a) Use the menu [View]-[Source] b) Use a browser that doesn't support that script like mozilla c) Use the context menu button on your keyboard (some PC's doesn't have this) d) Keep the mouse down while clearing the error box with Enter. e) Drag the image from the page to your desktop, or a folder in Windows Explorer. It doesn't work on images that are links, though. f) Use the "save pic" button Internet Explorer floats over an image. g) Raid Internet Explorer's cache for the pic. h) Turn off JavaScript in your browser. i) Use a Download Manager like GetBot. j) Press Shift-F10 in IE for right-click simulation. k) Run the following Javascript in the address bar while viewing the page:
    javascript:void(document.onmousedown=null); void(document.oncontextmenu=null);

    2) Open pages in a new window without the menu, standard buttons, address bar, status bar, etc. with no right-click script : a) Press [F11] in IE to change to full screen, then you can enable the address bar. Copy the link and paste it into a page, creating a direct link, open it and right click on each link [Save Target As...] b) Press Shift-F10 in IE for right-click simulation

    3) Frames with no right-click, no select, no context menu? E.g.: <body onmouseover="window.status=' ';return true;" oncontextmenu="return false" ondragstart="return false" onselectstart="return false"> : a) Use the menu to view the frame source, and save the individual pages' links, then paste it into a page, creating a direct link, open it and right click on each link [Save Target As...]"

    Elin, one of our ex-supermods, found an article on the internet explaining why the no-right click script is really useless:
    Quote Originally Posted by elin
    Just an interesting piece of advice. Follow this link,
    andersgrim, one of our members, found an article on the internet on anticircumvention:
    In order to control the distribution and use of their works, copyright owners are increasingly embedding access (keep you from accessing the work) and copy (control what you do with the work) protection schemes in their digital works. Under section 1201 of the Digital Millennium Copyright Act (DMCA), the circumvention of these access mechanisms is illegal, with only a few narrow statutory exemptions. The DMCA also prohibits the distribution of programs that can be used to circumvent both copy control and access control technologies.
    Last edited by samliew; 07-04-2006 at 04:45 AM.

  2. #2
    Join Date
    Mar 2005

Similar Threads

  1. no right click javascript!!
    By ali in forum Javascript / AJAX / VBScript
    Replies: 4
    Last Post: 06-14-2006, 09:16 PM
  2. right click help
    By rdinva in forum Javascript / AJAX / VBScript
    Replies: 1
    Last Post: 12-05-2002, 11:11 AM
  3. Changable Link Based on Left Mouse Click or Right Mouse Click
    By Mark Moss in forum Javascript / AJAX / VBScript
    Replies: 1
    Last Post: 11-18-2002, 08:21 PM
    By ineedhelp!!! in forum Javascript / AJAX / VBScript
    Replies: 1
    Last Post: 08-01-2001, 03:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBadvanced CMPS v4.1.1