prevent user to "view Source" from Internet Explorer

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!
 
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>
 
..and do you think someone interested in your source code doesn't know how to disable javascript?:p
 
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.
 
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
 
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

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
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 wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back