Hey Y'all,

I've been tryin to prevent visitors from viewing the right-click menu on my pages, and I therefore implemented this most excellent combination of functions and variables only to realise that, no matter what I do, the right-click menu still appears. I was so happy, I decided to turn my PC off.

NOW.. let me explain. My function use to look similliar to the following:

function click(e) {
if (event.button == 2) {
alert("Program cause an illegal opperation, yada yada yada)
return false;
}
}

document.onmousedown = click;


NOTE: I'm only showing the IE versions of my scripts.

After all that effort, everything seemed to be going well, untill I decided to write my own menu. My script then looked like this:

function click(e) {
if (event.button == 2) {
showOnlyMyMenuPlease();
return false;
}
}

document.onmousedown = click;


Whilst having the alert box in my script, the right-click menu did not apear, obviously becuase it's focussing on the Alert box and nothing else, whereas when my DHTML menu pops up, the damn right-click menu apears over mine. HOW WUDE!

Now I've tried event.returnValue and everything else set to false, but no go's.

ANY ideas?