The oncontextmenu Event


The oncontextmenu Event

The oncontextmenu event occurs when the user clicks the right mouse button in the client area, opening the context menu. You can find the support for this event in Table 6.62.

Table 6.62. The oncontextmenu Event

Event

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

oncontextmenu

             

x

x

x

This event occurs when the user clicks an object with the secondary mouse button (usually the right button), which causes the browser to display a context menu of commands.

Tip

You can cancel the normal action connected to a right-click in the Internet Explorer by returning a value of false from the oncontextmenu event handler, or by setting window.event.returnValue to false in the event handler. Doing so can stop the user from downloading images from your web page ( assuming the user has not deactivated scripting in the browser).




Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net