PDA

Click to See Complete Forum and Search --> : Disable "Show Source" script


Sick Dwarf
April 11th, 2002, 01:33 AM
Does anyone know a javascript that disables the "Show Source" option in IE. :confused: I've searched through some sites but I couldn't find one. Thnx.

Unleashed
April 11th, 2002, 02:00 AM
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.

valhallen
April 11th, 2002, 02:33 AM
<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

Unleashed
April 11th, 2002, 04:58 AM
Ok check this one: http://www.cyberarmy.com/encrypt.shtml

Sick Dwarf
April 11th, 2002, 11:33 PM
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?