HTML Ladies. I need your help!

mixedclawzz

New member
<script language="JavaScript">
<!--

//Disable right mouse click Script
//By Maximus ([email protected]) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

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

function clickNS4(e){
if (document.layers||document.getElementById&&!docume nt.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 did everything that was stated here for no right click. And it's not working. What am I doing wrong? I put it in the add a element- html option, saved and everything.
 
You can paste this script in a HTML/Java page element:

<SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>

But if someone really wants to get your images, etc they still can without the right click. You can still do print screen etc. The best thing is to watermark your images.
 
No right click block script will work if the user has javascript disabled, there is only so much you can do anyway.
If you DO have it enabled and it's not working, if you're using firefox (I don't know about IE), try writing


javascrit:

in the adress bar of your browser and it should tell you what is wrong.
 
I had a problem getting it to work as well when I first added it, but my problem was I had been told to add it directly to the page source code right before the </head> tag. Then after looking around I found where someone said the best way to get it to work on blogger is by using the Add HTML Element option. So I did that & it worked just fine. You might want to try pasting it in your actual HTML right before the </head> tag and see what happens.
 
I teach online html classes at WebTech University and if you copy those codes from Dynamic Drive or any javascript code, it MUST go in the HEAD section or it will not work.

Also, they can get it even if you have that code there. All you have to do is go to view > view source and they can see the coding to obtain the name of the image. Also, if javascript is disabled - they can get just by right clicking.
 
Oh wait - disregard my comments. You're using Blogger and they do it differently. But, what I said applies to those with their own domains.
 
I've never had any trouble using the Dynamic Drive scripts as per their instructions on my business websites...so I dunno.

The thing is, this does nothing. They can go and grab the code for the image out of your source code like Paula said, or they can do a screenshot. So it sucks anyway, if they want it, they'll get it.
 
Back
Top