dcsimg

How can I prevent the user from bringing up the browser's popup menu?

John Zukowski

For Internet Explorer, the following code will prevent the popup, displaying an alert popup instead.


<script language="JavaScript"><!--

function click() {if (event.button==2) {alert('Disabled')}}
document.onmousedown=click
-->
</script>
Also IE-specific, you can also do the following in the BODY tag:
<body oncontextmenu="return false;">