no right click mouse with alert 
Author Message
 no right click mouse with alert
hi
i'm trying to disable the right click button of the mouse with jcript,
but without the alert, i want no notification just disable it.

can anyone help please ?
thank you in advance, Eitan - Hazan.



Fri, 17 May 2002 03:00:00 GMT  
 no right click mouse with alert
Hi

IE5

<body oncontextmenu="return false">

--
Best Regards
 Vidar Petursson
http://www.icysoft.com


Forums
http://www.icysoft.com/com/forums/index.html
No matter where you go there you are
-

Quote:
> hi
> i'm trying to disable the right click button of the mouse with jcript,
> but without the alert, i want no notification just disable it.

> can anyone help please ?
> thank you in advance, Eitan - Hazan.



Fri, 17 May 2002 03:00:00 GMT  
 no right click mouse with alert
With IE5 there is
  document.oncontextmenu = function () { return false; } ;

Quote:

> hi
> i'm trying to disable the right click button of the mouse with jcript,
> but without the alert, i want no notification just disable it.

> can anyone help please ?
> thank you in advance, Eitan - Hazan.

--

        Martin Honnen

        http://home.t-online.de/home/martin.honnen/jsgoddies.html



Fri, 17 May 2002 03:00:00 GMT  
 no right click mouse with alert
But how's the "silent" right-click disable done ?
I think it cant be done "silently" ...

--
Marek M?nd



Thu, 30 May 2002 03:00:00 GMT  
 no right click mouse with alert
If your wondering  how to disable the right mouse click this might help for
IE4 or IE5

So in IE5 its really easy.  To disable the context menu
format the body tag like ...

<body oncontextmenu="return false">

When you set oncontextmenu to false in the body the context
menu wont come up anymore.  But to do the same thing in IE4
requires a hack that works 90 percent of the time.  The
trick is you'd have an onmousedown event handler for the
body tag.  Inside the event handler you'd check to see if
the 2 mouse button was pressed and if it was then youd set
focus to a hidden submit button.  So my memory is a little
rusty but Ill try to remember the code...

<Head>
<script>
function handleMouseDown() {
  if(event.button == 2) hiddenSubmit.focus();

Quote:
}

</script>
</head>
<body onmousedown=handleMouseDown>
  <input type="submit" name="hiddenSubmit"
style="visibility:hidden">


Quote:
> But how's the "silent" right-click disable done ?
> I think it cant be done "silently" ...

> --
> Marek M?nd




Thu, 30 May 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Cancelling a Right Mouse Button Click

2. disable mouse right-click

3. Mouse Right Click Event

4. Detecting Right Mouse Clicks

5. Mouse Right Click Event

6. Javascript detect a right mouse click?

7. sendkeys right mouse click...

8. Can you right mouse click on a link

9. Right mouse button click

10. Right Mouse Click

11. pop up menu when right mouse button clicked

12. event--onclick, ondblclick, right mouse button click

 

 
Powered by phpBB® Forum Software