to some extent it is possible .... do this :
function disableselect(e) {
return false;
}
function reEnable() {
return true;
}
document.onselectstart = new Function("return false");
if (window.sidebar) {
document.onmousedown = disableselect;
document.onclick = reEnable;
}
Place this under your <head>
tags and the user cannot select text on your page.However, there is no guarantee way to prevent your contents from being stolen.The JavaScript above can be easily bypassed by an experience internet user. E.g. If the browser's JavaScript is disabled, the code will not work.
and to disable the right click on browser , do this :
<body oncontextmenu="return false;" >
and to detect whether user have disable js or not ? if disabled then redirect him to other page like this :
<body oncontextmenu="return false;" >
<noscript>
<meta HTTP-EQUIV="REFRESH" content="0; url=NoJSPage.html">
</noscript>
<!-- your body contents goes here -->
</body>
Complete example package [DETECT DISABLED JS + DISABLE SPECIAL KEYS WITH COPYING FUNCTION + REDIRECTING TO OTHER PAGE ON DISABLED JS] would be like this :
<head>
<script type="text/javascript">
function disableselect(e) {
return false;
}
function reEnable() {
return true;
}
document.onselectstart = new Function("return false");
if (window.sidebar) {
document.onmousedown = disableselect;
document.onclick = reEnable;
}
</script>
</head>
<body oncontextmenu="return false;" >
<noscript>
<meta HTTP-EQUIV="REFRESH" content="0; url=NoJSPage.html">
</noscript>
<!-- your body contents goes here -->
</body>
ENJOY .... !!!