Hi all,
I found a no right click script... it works fine if I have no frames. But when I placed in the main frame... it didn't work. What should I do?
Here is the script. I have a Top frame(topFrame) and target(content).
<SCRIPT language="JavaScript">
<!--
var msg = " No right click for you!";
if(document.layers) window.captureEvents(Event.MOUSEDOWN);
function no_click(e){
if (navigator.appName == 'Netscape' && ( e.which == 2 || e.which == 3))
{
alert(msg);return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
{
alert(msg);return false;
}
}
window.onmousedown=no_click;
document.onmousedown=no_click;
//-->
</SCRIPT>
Thanks.
Regards,
SOon
I found a no right click script... it works fine if I have no frames. But when I placed in the main frame... it didn't work. What should I do?
Here is the script. I have a Top frame(topFrame) and target(content).
<SCRIPT language="JavaScript">
<!--
var msg = " No right click for you!";
if(document.layers) window.captureEvents(Event.MOUSEDOWN);
function no_click(e){
if (navigator.appName == 'Netscape' && ( e.which == 2 || e.which == 3))
{
alert(msg);return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
{
alert(msg);return false;
}
}
window.onmousedown=no_click;
document.onmousedown=no_click;
//-->
</SCRIPT>
Thanks.
Regards,
SOon