Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to block right-click on my site  (Read 8961 times)

0 Members and 1 Guest are viewing this topic.

sambitha

    Topic Starter


    Starter

    how to block right-click on my site
    « on: May 07, 2009, 05:05:13 AM »
    Hi, anyone can help ?

    i want to Block right-Click when some one visit My Website and also don't allow to save the Web Page ,
    is it possible to do it with Simple HTML code ?
    any help appreciated ,

    GlitchPC

    • Guest
    Re: how to block right-click on my site
    « Reply #1 on: May 07, 2009, 05:10:30 AM »
    Why?

    Any browser can still view the source code...blocking right-click is a waste of time.

    fffreak



      Adviser

    • That's right I am a final fantasy freak.
    • Thanked: 3
      • Yes
      • JSPCRepair
    • Certifications: List
    • Experience: Guru
    • OS: Windows 7
    Re: how to block right-click on my site
    « Reply #2 on: May 07, 2009, 11:49:21 AM »
    Well for the most part, a no-right-click script is used to help prevent people from copying/stealing images on a site, although still true a user can still pull up the source code regardless of blocking the right click mouse function, and by which still download/steal images off a site...

    But if you still insist, I'll give you a snippet of mine...

    Code: [Select]
    <script language=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.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
    else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
    document.oncontextmenu=new Function("return false")
    // -->
    </script>

    Just place the above code under the < head > tag...
    Computers are the future, not us. Learn everything you can about them while you still can, soon they will be learning about us... Every bit of advice that I give you is best guess, it is your choice whether or not you listen to it.

    Helpmeh



      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: how to block right-click on my site
    « Reply #3 on: May 10, 2009, 10:41:53 AM »
    Is it also possible to block keys? For instance, CTRL? Because you can easily copy an image and paste it into paint.
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpac®
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: how to block right-click on my site
    « Reply #4 on: May 10, 2009, 02:21:06 PM »
    Is it also possible to block keys? For instance, CTRL? Because you can easily copy an image and paste it into paint.

    Nope. There's no point anyway.

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: how to block right-click on my site
    « Reply #5 on: May 10, 2009, 08:01:25 PM »
    Is there any button to prevent the key PrintScreen from being used?

    ::)

    Helpmeh



      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: how to block right-click on my site
    « Reply #6 on: May 11, 2009, 03:00:50 PM »
    Is there any button to prevent the key PrintScreen from being used?

    ::)
    >:(
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: how to block right-click on my site
    « Reply #7 on: May 11, 2009, 08:20:11 PM »
    Why the angry face?

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: how to block right-click on my site
    « Reply #8 on: May 11, 2009, 08:28:23 PM »
    and is there anyway to block people from opening the menus in their browser? or using their keyboard or mouse?


    And also, is there a way to prevent downloading of the web page? (yes there is- don't create it!)


    people who want to "block" certain attributes that are inherent in the web are missing the whole point of the web, which is, in essence, the sharing information.

    Additionally, I might point out that if you don't want somebody to download something from your web site- don't put it ON your web-site, this is the only way to prevent it.

    "But they can't see the pictures if I do that" you say. Well, here's a news flash- they have to download all the HTML, CSS, and other client side files (such as images) before they can see them anyway, so by the time your in the position to "block" this right-click download the file is already on their local machine and you've lost.

    The "security" measure your trying to enforce is analogous to trying to enforce windows account permissions by simply "blocking" the appropriate context menu options. Other programs, the command window, and countless other ways are present for doing the tasks blocked at the context menu, which would make the creation of such an account control method questionable.

    the same questionable tactics are found in blocking right-click access.

    Right-click access is determined by the browser, and pages trying to block it through script can easily be stopped by simply not allowing scripts to run. This has the added benefit of not having to put up with some crappy MIDI music started through script or having to watch that stupid DIV cursor animation that the page author found so nifty.
    I was trying to dereference Null Pointers before it was cool.

    2x3i5x



      Expert
    • Thanked: 134
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 10
    Re: how to block right-click on my site
    « Reply #9 on: May 15, 2009, 10:19:45 PM »
    Is there any button to prevent the key PrintScreen from being used?

    ::)

    Is there any way to prevent Print Screen applications like Screenhunter or Gadwin PrintScreen from being installed that can use other keys than PrintScreen? Or how do you disable snipping tool in Windows 7?

    There's still plenty of ways to get pictures of a website in good quality even if right click is disabled!

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: how to block right-click on my site
    « Reply #10 on: May 15, 2009, 10:23:42 PM »
    Then there's Onenote's Screen-Clipper, Third party screenshot programs, firefox screenshot add-ons (such as ScreenGrab), heck even a digital camera!

    I suppose lasers will shoot out of the keyboard when you try to take a picture of your screen with a camera. :P

    2x3i5x



      Expert
    • Thanked: 134
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 10
    Re: how to block right-click on my site
    « Reply #11 on: May 15, 2009, 11:13:23 PM »
    http://www.protware.com/default.htm --> image guardian. Looks like a good software for preventing stealing of images directly off websites. But in all reality, I believe that there's no foolproof way of preventing images from being copied.

    GlitchPC

    • Guest
    Re: how to block right-click on my site
    « Reply #12 on: May 15, 2009, 11:25:04 PM »
    Best way to prevent image stealing is by using watermarks.

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpac®
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: how to block right-click on my site
    « Reply #13 on: May 16, 2009, 06:30:11 AM »

    darwinjames



      Starter

      Re: how to block right-click on my site
      « Reply #14 on: May 16, 2009, 06:43:07 PM »
      I implemented Watermark, bad part is it ruined all image quality. :(

      Helpmeh



        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: how to block right-click on my site
      « Reply #15 on: May 16, 2009, 07:08:45 PM »
      Code: [Select]
      <table>
      <tr><td background="YOUR IMAGE HERE" width="100"><img src="WATERMARK IMAGE HERE (Transparent background required)" width="231" height="58"></td></tr>
      </table>

      That code should add the watermark without degrading quality (if it does).
      Where's MagicSpeed?
      Quote from: 'matt'
      He's playing a game called IRL. Great graphics, *censored* gameplay.

      2x3i5x



        Expert
      • Thanked: 134
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 10
      Re: how to block right-click on my site
      « Reply #16 on: May 16, 2009, 10:45:01 PM »
      I implemented Watermark, bad part is it ruined all image quality. :(

      This website I list below  is easy to use and adds watermark text right over your picture without any loss of quality to your original image.

      http://picmarkr.com/markr.php