How to disable Right click

3 replies
  • WEB DESIGN
  • |
How to disable Right click in HTML
#click #disable
  • Profile picture of the author iBBnet
    You can use javascript:

    <SCRIPT language=JavaScript>
    var message="";
    ///////////////////////////////////
    function clickIE() {if (document.all) {(message);return false; } }
    function clickNS(e) {if
    (document.layers||(document.getElementById&&!docum ent.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.oncontext menu=clickIE;}

    document.oncontextmenu=new Function("return false")</SCRIPT>
    It's not exactly fool-proof
    Signature
    Bryan
    After5PC.net
    Freelance Web Development
    and Graphic Design Services
    {{ DiscussionBoard.errors[2135268].message }}
  • Profile picture of the author sabian1982
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[2136531].message }}
  • Profile picture of the author michaellive1986
    yah .. you're right...why a such thing you want yo disable that..?
    think first..before you do something....then, think twice... ..
    {{ DiscussionBoard.errors[2141312].message }}
  • Profile picture of the author kittyd
    don`t disable right click... it is useless & painfull for your visitor.
    not everybody wants to steal your pics, and those that do, can find their way anyway
    withouth right click ppl can`t open a link in a new window if they so chose too, they can`t email a page to frinds, they can`t bookmark the page the way they are used to (i bokmark from the right click menu)

    you will just annoy your average visitors and you won`t stop thirves to get what they want anyway

    just don`t do it, please
    {{ DiscussionBoard.errors[2234048].message }}

Trending Topics