2005-09-22 20:24:16
Preventing embedded files from being downloaded
Hi
My client would like to prevent her embedded powerpoint files and other files from being downloaded from her web site for copyright reasons.
As a make do, I instructed her to do the following to prevent them right clicking on the hyperlink and downloading the file. Is there an easier way to do this in Atutor?
a. First do all the "stuff" you need to do using the visual editor when adding content.
b. Then switch back to the text editor.
c. Makesure the HTML button is still selected.
d. copy and paste this code at the very top of document.
<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 Disabled!";
///////////////////////////////////
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>
e. save and close the document.
Thanks