I\'ve seen plenty of questions and answers on SO and elsewhere that talk about right click events and how to catch and handle them with JavaScript, generally using the
Sure, just add a onmousedown listener, check which mouse was pressed:
onmousedown
JS:
document.getElementById("test").onmousedown = function(event) { if (event.which == 3) { alert("right clicked!"); } }
HTML:
Test
Demo: http://jsfiddle.net/Jmmqz/