• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

prevent user to "view Source" from Internet Explorer

J

jake123456789

Guest
#1
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
#2
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>
 

SPeedY_B

I may actually be insane.
#5
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.
 
#6
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 User
#7
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 posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,012
Latest member
Sierge