Announcement

Collapse
No announcement yet.

html to prevent right click?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • html to prevent right click?

    Do you know how to prevent right click just only header section? I heard that I have to put html into somewhere. Can somebody help me to solve this?

  • #2
    Such code will apply to the whole frame it is in.

    HTML Code:
    <!-- Copyright &#169;2005 Kier Darby and www.thenewdeli.com -->
    function donothing()
    {
    return false;
    }
    document.oncontextmenu = donothing;
    <!-- bypass this by turning off javascript! -->

    Comment


    • #3
      Where can I put it in? Can you tell me in detail, please?

      Comment


      • #4
        In a .js file, and then call that somewhere in your .html file.

        Comment


        • #5
          This code can be easily disabled by typing "javascript:void(document.oncontextmenu=function(){return true});" in the address bar of your browser. It'll only aggravate your users, without preventing anyone determined from stealing your content.
          Last edited by ajaspers; Sun 7 Aug '05, 9:25am.

          Comment


          • #6
            The guys on our forums had some fun with no right click and hiding source when they got bored once, the lengths they went to:
            http://www.webxpertz.net/forums/show...9&page=1&pp=40
            Later
            Keith

            Webxpertz Community for Webmasters & Developers

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X