I want to open a popup window when someone clicks an area with the right mouse button. I am using this at the moment:
$("#popup").bind('mousedown', function(e) {
var w;
if(e.which==3) {
w=window.open('link','_blank','options');
} else {
return false;
}
if(w!=null){
w.focus();
}
event.preventDefault();
});
When using it with firefox (haven't tested with other browsers though) the popup is being blocked. I have noticed that with the "click" event it doesn't work at all.
Is there any way to open a popup window when right clicking on something without it being blocked by a browser?