
May 19th, 2004, 10:43 AM
|
 |
Newton's Apple Wizard
|
|
Join Date: Nov 2003
Location: Los Angeles
|
|
Try this:
Code:
<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>
It's definitely not fool proof but it's probably the most fool-proof of the various options.
1) You can always View Source from the dropdown menu
2) My browser (Safari) is not stopped by any of these types of scripts
3) Save As will take images and source code from the sites and save it to the hard drive.
What is the reason you are trying to limit this action and maybe there is a better way.
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|