[Javascript] right click base popup

Dan Costea costea.dan at ssi-schaefer.ro
Tue Dec 11 10:24:38 CST 2001

right click base popupIf you want to get rid of the context menu, try this:

<body onContextMenu="return false">

Then you can use events like onClick, onMouseDown, onMouseUp to call your own functions (to open a popup, a div or whatever you need to).

If you need the context menu in some cases, try:

<body onContextMenu="return event.ctrlKey">

then you will have the context menu only if you have ctrl key pressed (this might be useful sometime).

  ----- Original Message ----- 
  From: FERON Matthieu 
  To: 'javascript at LaTech.edu' 
  Sent: 11 December, 2001 5:49 PM
  Subject: [Javascript] right click base popup

  when you right click on on window or an image or somethin you 've got a default popup with 
  'open in new window' etc etc... 
  So, I would really like to get rid of this because I need the right click to do something. 
  I tried to catch the onmouseup event but it seems that it doesn't care at all. 
  Please HEEEEELP !!   ;-)) 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20011211/e6ce41ac/attachment.htm>

More information about the Javascript mailing list