Changing default Right Click Warning Message
SloYerRoll
Registered Users Posts: 2,788 Major grins
I know this is easy.
Ive added a right click warning message in my JS. And it doesn't protect my galleries. (example here)
I can go into the control panel and protect them. But the verbage isn't what I want to use.
Any ideas on where i goofed this up?
I'll stop screwing w/ it for a bit so we don't cross paths.
Thanks,
-Jon
Ive added a right click warning message in my JS. And it doesn't protect my galleries. (example here)
I can go into the control panel and protect them. But the verbage isn't what I want to use.
Any ideas on where i goofed this up?
I'll stop screwing w/ it for a bit so we don't cross paths.
Thanks,
-Jon
0
Comments
this is what I use, put into javascript
/*============================*/
/*== Right Click Protect ==*/
/*============================*/
<!--
document.oncontextmenu = rightProtect;
function rightProtect(e) {
if (window.event) {
var srcEl = event.srcElement ? event.srcElement : event.target;
}
else {
var srcEl = e.srcElement ? e.srcElement : e.target;
}
if (srcEl.tagName.toLowerCase() == 'img') {
window.alert(rightClickWarning);
return false;
}
else {
return true;
}
}
var rightClickWarning = "You can purchase this image file by clicking the Buy button above.";
//-->
1D MarkIII, 16-35L, 28-70L, 70-200f2.8L, 50 f1.4, 300/f2.8L 1.4xL, 2XIIL (2)580EX, supporting cast of other stuff
dale@dhlewisphotography.com
http://dhlewisphotography.com
Thanks DH!
-Jon
GreyLeaf PhotoGraphy