Post new topic Reply to topic  [ 1 post ] 
[BBCode]Block mouse right button 
Author Message
Portuguese Support

Joined: Mon May 04, 2009 9:40 pm
Posts: 213
---------
 [BBCode]Block mouse right button
Hi all

Whant to block the mouse right button options?

Here is the solution


BBcode:

Code:
[noright][/noright]



HTML substitution

Code:
<script language=JavaScript>
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function not allowed";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>



Just change the message that you want to warning.

Code:
var message="function not allowed";



Helpline:

put those tags at the beginnig or at the end of your post
Code:
[noright][/noright]


Sat Mar 05, 2011 12:31 am
Profile E-mail
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron