prevent user to "view Source" from Internet Explorer

  • Thread starter Thread starter jake123456789
  • Start date Start date
J

jake123456789

Guest
I want Java source code to prevent internet explorer user click on second mouse and view resource.

Can Someone email to me pls or post it over!

Thanks you!
 
H

Herkalees

Guest
This disables right-click entirely.


PUt this in the body tag…


<script language=JavaScript>
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>
 

yoyo

_________________
Joined
29 Jul 2002
Messages
1,557
..and do you think someone interested in your source code doesn't know how to disable javascript?😛
 

SPeedY_B

I may actually be insane.
Joined
31 Mar 2002
Messages
15,807
Heh, I was going to write what yoyo and drahzar have posted above me.

It is, absolutely, 100%, impossible to hide your source code.
Because basically, that source gets sent to the browser, without it there's is nothing to render, and once your source is at the user end there are multple ways of viewing it.

For example, turn javascript off, use a different browser, put the URL into a download manager then open it with notepad, put the URL into the open dialog of something like frontpage, find the cached version of the page and open it up, and so on.
 

sboulema

OSNN Veteran Addict
Joined
19 Jun 2002
Messages
2,846
why do you website makers are so pinned on protecting our sourcecode. i find it very annoying when sites do that cause i cant use my mouse gestures on that kinda sites
 

X-Istence

*
Political Access
Joined
5 Dec 2001
Messages
6,498
I hate it as well, if someone wants to rip my sites source they can do so if they wish. Ill just kill them if i find my desing on another site.

Mozilla still pops the window up even if that message comes so right click still works 😉.
 

Members online

No members online now.

Latest profile posts

Xie Electronic Punk Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. 🙁

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk Sazar Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz Electronic Punk Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk Sazar Electronic Punk wrote on Sazar's profile.
Where are you buddy?

Forum statistics

Threads
62,017
Messages
673,508
Members
5,636
Latest member
GLOCKTOR642
Back