View Single Post
Old 03-06-2009, 09:15 PM  
jmcb420
So Fucking Drunk
 
jmcb420's Avatar
 
Industry Role:
Join Date: Oct 2006
Posts: 2,155
Redirect on Event.MOUSEDOWN can it be done?

Im trying to figure this out but coming up with nothing.
I want this to happen on a page of text links. Currently I have it so that the user would find their right click is disabled, but clicking the text link as you would normaly takes you to the url it points to.

Heres the Javascript code currently allowing me to do this:

<script language="Javascript1.2">
//
function nrcIE(){
if (document.all){return false;}}
function nrcNS(e){
if(document.layers||(document.getElementById&&!doc ument.all)){
if (e.which==2||e.which==3){
return false;}}}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=nrcNS;
}else{document.onmouseup=nrcNS;document.oncontextm enu=nrcIE;}
document.oncontextmenu=new Function("return false");
</script>

What I want to do is redirect users to a certian page on right click. I know it can be done, I just have dont know what i'm over looking. Google has been of no use this time.
Any ideas? Thanks in advance.
__________________
I'm funner than AIDS, and easier to explain to your parents.
jmcb420 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook