File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to disable popup menu in IE using javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to disable popup menu in IE using javascript?" Watch "How to disable popup menu in IE using javascript?" New topic
Author

How to disable popup menu in IE using javascript?

harivarma mudunuru
Greenhorn

Joined: Sep 07, 2000
Posts: 8
I want pop-up menu not to be displayed, when right clicking in the browser window. Can any one help me?
mahadevan raja
Ranch Hand

Joined: Apr 11, 2001
Posts: 96
hey,
u shud write a onmousedown event on the body tag,and check in the function whether the event.button==2(this is the numeric equivalent of the right click for a 2 button mouse),if u have any doubt then prompt the event.button in the function and find out the equivalent of the right click,then proceed further.any more doubts,contact me.


SPECIALIST-WCSV5.1 Implementation.<br />SYSTEMS EXPERT-WAS4.0 Administration
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
In IE5 and above just add the following to your BODY:
harivarma mudunuru
Greenhorn

Joined: Sep 07, 2000
Posts: 8
Hi Bodie,
Thank u for the information. U are great. It's working fine.
Originally posted by Bodie Minster:
[B]In IE5 and above just add the following to your BODY:
[/B]

Reilly Morris
Ranch Hand

Joined: Sep 11, 2001
Posts: 44
Hi folks...
The oncontextmenu is genius! I wrote code which used the onClick method and prompted an alert, but this one is far more authoritative. That being added, how do I now restrict viewrs from my source code through the View >> Source menu? This one would be really nice to have.
Reilly


<b>Reilly</b> <br /><i>SCJP,J2EE,OOAD,iNet+,A+,CIW,<br />MCP,--</i>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to disable popup menu in IE using javascript?
 
Similar Threads
collapsable list
calling a servlet by clicking a menu?
Can i use Menu & Menu options in applet?
Menu implementation in Struts2
Trouble with displaying fonts