[Javascript] right click base popup

Esther_Strom at hmco.com Esther_Strom at hmco.com
Tue Dec 11 10:31:03 CST 2001


Keep in mind that this doesn't work in Netscape (at least in 4.x; don't
know about 6.)



                                                                                                                        
                    "Dan Costea"                                                                                        
                    <costea.dan at ssi-sc        To:     <javascript at LaTech.edu>                                           
                    haefer.ro>                cc:                                                                       
                    Sent by:                  Subject:     Re: [Javascript] right click base popup                      
                    javascript-admin at L                                                                                  
                    aTech.edu                                                                                           
                                                                                                                        
                                                                                                                        
                    12/11/01 10:24 AM                                                                                   
                    Please respond to                                                                                   
                    javascript                                                                                          
                                                                                                                        
                                                                                                                        




If 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 !!   ;-))










More information about the Javascript mailing list