Results 1 to 5 of 5

Thread: Disable "Show Source" script

  1. #1
    Senior Member
    Join Date
    Mar 2002
    Posts
    502

    Disable "Show Source" script

    Does anyone know a javascript that disables the "Show Source" option in IE. I've searched through some sites but I couldn't find one. Thnx.
    Bleh.

  2. #2
    Here you are:

    <script language="javascript">
    function noRightClick() {
    if (event.button==2) {
    alert('You can NOT Right-Click on this page -- but you CAN Left-Click.')
    }
    }
    document.onmousedown=noRightClick
    </script>

    -------------
    Instructions:
    -------------

    Paste the JavaScript segment above into the header of your page.
    (That is, between the <HEAD> and </HEAD> tags.

    Change the message in the alert() call from our message
    ('You can NOT Right-Click on this page -- but you CAN Left-Click.')
    to whatever you wish to appear in the alert box.

  3. #3
    <script language="javascript">
    function noRightClick() {
    if (event.button==2) {
    alert('You can NOT Right-Click on this page -- but you CAN Left-Click.')
    }
    }
    document.onmousedown=noRightClick
    </script>
    ummmm all that does is disbale the right click function but by going to view > source you can still see the web-sites source code

    I know the code ur talking about tho Sick Dwarf as have seen it on a couple of web-pages....but as the code hides the source I couldn't rip it

    I'll take a look about see if i can dig it up if i can I'll post it for you

    v_Ln

  4. #4

  5. #5
    Senior Member
    Join Date
    Mar 2002
    Posts
    502
    I already have the disable rightclick script, but not disable view source. By the way, is there also a code to disable it in Netscape?
    Bleh.

Posting Permissions

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