<script>
// DISSABLE RIGHT CLICK - START SCRIPT
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
// DISSABLE RIGHT CLICK - END SCRIPT
</script>
document
+ head
...
+ body
+ p
....
+ image
<html>
<head>
</head>
<body>
<div style="border:1px solid black;width:200px;height:200px;">
<div style="border:0px;width:200px;height:200px;z-index:0;">
<img src="http://a1600.g.akamai.net/7/1600/51/63d2ba975a17f6/www.apple.com/macosx/images/jagbox06232003.jpg" width="200" height="200">
</div>
<div style="border:0px;width:200px;height:200px;z-index:1;background:transparant;position:relative;left:0px;top:-200px;"><!-- This div protects the image --></div>
</div>
</body>
</html>
Originally posted by Cuckoo
Couln't reisist on my wintel, XP pro.. with the latest IE...
and i could just access the picture and it's source
http://homepage.mac.com/robbieduncan/galleries/christmas2000/thumbnails/008.jpg
is the image...
not to rain on your parade, but i was wandering, that you might want to improve the HTML.
Or am i missing the point... In that case, im sorry for the misperception.
Originally posted by edesignuk
Very nice robbie, it also does work under Firebird (Windows), but as Cuckoo said, it doesn't seem to work under IE 6. The image even aligns differently, in IE it is centered on the page, in Firebird it is on the left, maybe that has something to do with it?
Very true, but the average joe wouldn't know what the hell they were looking for in the source code.Originally posted by mrjamin
its impossible to stop people looking at your code - most (if not all) browsers have a "view source" link from one of the main menus. probably the best way to stop people from snooping around its to get rid of all whitespace and line breaks in the code so its all on one line. Yeah, it might be a pain to edit but thats the idea!
Originally posted by edesignuk
Very true, but the average joe wouldn't know what the hell they were looking for in the source code.
Originally posted by mrjamin
its impossible to stop people looking at your code - most (if not all) browsers have a "view source" link from one of the main menus. probably the best way to stop people from snooping around its to get rid of all whitespace and line breaks in the code so its all on one line. Yeah, it might be a pain to edit but thats the idea!
...
...
There's no 100% reliable way of protecting your images as afterall, people can always do a screenshot and manipulate that!