Log In · Register

 
Disable Right Click?, Looking for non-Java Script!?
modumus
post Sep 26 2005, 05:11 AM
Post #1


Newbie
*

Group: Member
Posts: 6
Joined: Aug 2005
Member No: 199,731



I'm looking for either a non-Java Script or a way around entering a Java Script for disabling the 'Right-Click' option on the pics, etc on my profile.

I'm not that bothered about security, etc. i more just want to know if it can be done.

I notice this MySpace Profile uses the java script to disable the right-click but i dont know how they managed to apply it:

MySpace Profile

Any ideas?
 
 
Start new topic
Replies
KindLadyJigsaw
post Jun 15 2006, 09:29 PM
Post #2


Uh-Lar-Ray!
****

Group: Member
Posts: 110
Joined: Mar 2005
Member No: 108,897



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="Hey what gives?!";

///////////////////////////////////
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>


^ I believe that is the code he is using...

I tried using it for mine, but it doesn't work.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: