Click to See Complete Forum and Search --> : Disable View Source


Madhi
November 26th, 2004, 03:37 AM
Is there any way to hide users from seeing the source code?

Madhivanan

Cimperiali
November 27th, 2004, 08:12 AM
yes- at least you can make it harder to see:
serach for a function to "disable" right click (indeed it is a function that on
right click show an alert...), and have your pages without menubar, title bar,...
(serach for "window.open" and its options...)
Then you should disable also the possibility of opening a new window from
previous (see what happens when in Ie you press ctrl+n ?)

example of disabling right click

<script language=JavaScript>
<!--

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>



example of opening windows
window.open ("http://www.Codeguru.com","mywindow","status=1");


example of disabling ctrl+new
http://forum.java.sun.com/thread.jspa?forumID=45&messageID=2789848&threadID=223379
or
http://www.faqts.com/knowledge_base/view.phtml/aid/23599/fid/53

Madhi
November 28th, 2004, 11:00 PM
Thanks. I want to know how to disable tool bar.

Madhivanan