Advanced Search

Results 1 to 4 of 4

Thread: Disable right click and text selection blogger?

  1. #1
    Join Date
    Dec 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Disable right click and text selection blogger?

    Hi is there any way that i can do this? I am a noob in this, so please teach me how. I'll post my blog template if I have to. I'm using firefox btw.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Code:
    <script type="text/javascript">
    	document.oncontextmenu = function () { alert('- All rights reserved -\nŠ2008 yourname'); return false; }
    </script>
    will popup an alert box on rightclick

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,626
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I wonder what you are trying to protect by disabling the right click. You can find lots of JS code that does this but believe me people can still do whatever they want with your content, images, etc even if you disable the right click.

    You'll be able to find lots of questions regarding this here if you search more.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,709
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Ditto what codeexploiter said.

    I would add that scripts to disable common browser functions will never succeed in their intent because browsers have the last say in these matters, and as codeexploiter pointed out, even when such scripts work, their are other ways for the user to get what they want.

    But, more importantly, such scripts add to the bandwidth of the page and may conflict with other code (javascript, or sometimes just plain HTML content) such that they then become basically just trouble.

    If your concern is protecting your content, copyright law does that.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •