Can this be modified for images only? Thanks.
Quote:
Originally Posted by cr3ative
This is quite possibly the most pointless script I've ever made
It is only verified to work in Internet Explorer.
Disable right and left click:
<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.onclick=clickIE;document.oncontextmenu=clickIE;}
return true;
}
document.onmousedown = disable;
</SCRIPT>
This damned messageboard's software puts random spacers in my script, even when its in CODE tags. If you see spaces in the script that are obviously incorrectly placed, remove them. Cheers.
cr3ative
http://www.dynamicdrive.com/forums/showthread.php?t=548



Reply With Quote



Bookmarks