Bart Van der Donck wrote:
Dustin Carroll wrote: <body onload="document.getElementById('image').onclick=e ventclick;">
<image align=center image border=2 img src="data.jpg" id="image">
How can I detect the right mouse click on this image?
<img
onContextMenu="return false;"
onMouseDown="if (event.button==2) alert('image was right-clicked');"
border="2"
src="data.jpg">
Due to the proprietary `oncontextmenu' attribute, that is invalid HTML as
well. AFAIS, the right mouse click can be detected this way in Geckos too,
but display of the context menu cannot be prevented whatsoever (and that is
good so). In case this is just another misguided attempt at preventing
users from downloading the image, please don't, and search the group
archives instead.
PointedEars