Sorry, I know that people hate answering this questions pertaining to the "disabling of right clicks" but bear with me. In keeping with the spirit of the FAQ's I found this example posted in 2000. Here's the code so you don't have to see for yourselves:
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- start hide
document.onmousedown = click;
if (document.layers)
document.captureEvents(Event.MOUSEDOWN);
function click(e)
{
if (document.all)
if (event.button == 2)
{
document.write(""); // need to do this to "fool" IE
return false;
}
if (document.layers)
if (e.which == 3)
{
return false;
}
}
// end hide -->
</SCRIPT>
All well and good, I love when I can get an answer from the FAQ's, but after playing with this its definitly not working right. The problem lies in this line:
Code:
document.write(""); // need to do this to "fool" IE
Having played with a few of these scripts it seems IE will not respond to these functions wihout attempting to notify the user. Thus document.write("") or alternatively in other scripts I've seen alter("Something"). Otherwise right clicks still work. I get that. However, as soon as a right click takes place on the page the title of the window changes to the url and the page seems to freeze. Right click more than once and the page goes blank. Does this FAQ need to be re-written for newer browser versions?
Is anyone else having the same problem? Am I crazy? Don't answer that.