securing a pic?

jmad

New Member
is there a way to make it so no one can take ur pics from ur site? or at least make it harder. I was thinking i maybe could try to do something with flash, but i was wondering if ne one knew an easy way of pulling it off. thanx

j
 

zkiller

Super Moderator
Staff member
their is no fool proof way to stop people from taking pics or videos that you publish on the internet. their are javascripts available that disable people from being able to right click save as your content, but generally the rule on the web is, if you don't want it stolen, don't put it on the internet.
 

jmad

New Member
thanx

hey z ne idea were i could find the code to disable that? i know it isn't fool proof but i don't want to make it easy. thanx for the link aa!
 

zkiller

Super Moderator
Staff member
try tossing this bit inside your head tags as i did below...

Code:
<head>

<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Original:  Martin Webb ([email protected]) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

</script>

</head>
hope that helps and remember to remove the added set of head tags, two sets may result in an error. they were just added for illustration.
 

tanjh

New Member
This is great info, thanks.


try tossing this bit inside your head tags as i did below...

Code:
<head>

<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Original:  Martin Webb ([email protected]) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

</script>

</head>
hope that helps and remember to remove the added set of head tags, two sets may result in an error. they were just added for illustration.
 
Top