Click to See Complete Forum and Search --> : mouse key blocking


man
07-24-2003, 07:33 AM
Itīs one of the often discussed scriptsmif usefull ore not!

Blocking IE,NS but can this be done with "Opera"?

I am using this one...

---------------------------------------
<SCRIPT language=JavaScript>
function noright()
{
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
}
noright();

</SCRIPT>

----------------------------------------------------------
On NS 6 and opera 7.11 there is no funktion...
----------------------------------------------------------
For NS 6 i use this...
----------------------------------------------------------

<body oncontextmenu="return false" ondragstart="return false";">

----------------------------------------------------------
But what can i use for Opera?

Khalid Ali
07-24-2003, 10:06 AM
Opera only returns
left mouse key = 1

and

right mouse key = 2

it does not return the center button value