Can someone help me figure out how to prevent users from taking a screenshot of my website by disabling the print screen key? Here's the code I've tried so far:
<SCRIPT type="text/javascript">
focusInput = function()
{
document.focus();
};
processKeyEvent = function(eventType, event)
{
if (window.event)
{
event = window.event;
}
if(event.keyCode == 44)
{
alert("Photos are copyright 2011");
return(false);
}
}
processKeyUp = function(event)
{
processKeyEvent("onkeyup", event);
};
processKeyDown = function(event)
{
processKeyEvent("onkeydown", event);
};
document.onkeyup = processKeyUp;
document.onkeydown = processKeyDown;
</SCRIPT>
Unfortunately, this solution doesn't seem to be working. Any suggestions on how I can effectively disable the print screen key?