Locking the graphics

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to lock the graphics on a web page so no one can right click
on a picure and save it
 
You could disable right-click on the page. I know they could still get
the file from their temporary internet files folder, but most people
probably wouldn't know how to do that.

To disable right-click:

<SCRIPT LANGUAGE="JavaScript1.1">
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("Right-click is disabled!");
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;
// End -->
</script>

HTH,
Cliff
 
Which also disables the right click context menu.
As a result a user can't right click and create a desktop shortcut in case they wanted to come back to the page later.
Nor can they use any of the other right click features.

Additionally, all a visitor has to do is select File > Save as web page on the browser toolbar and everything gets
saved anyway.

Blocking right click is "Not" a good idea.


--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm
 
Does nothing on my Mac. In fact it does nothing on my PC, either, when I
disable javascript in the browser.

It's much too cheesy and amateur to do this.
 
The point is, those that want your images, already know how to get them.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
It was just a thought.

Steve said:
Which also disables the right click context menu.
As a result a user can't right click and create a desktop shortcut in case they wanted to come back to the page later.
Nor can they use any of the other right click features.

Additionally, all a visitor has to do is select File > Save as web page on the browser toolbar and everything gets
saved anyway.

Blocking right click is "Not" a good idea.


--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm
 
No. Read the multiple posts on this issue!
By the time the page is displayed in the user's browser the page has already
been downloaded to the user's machine. It's the way the internet works.
 
i have another option its a little bit useful for preventing picture
toolbar in IE6
for each image by itself use this piece of code:
<img src="yourimage.gif" GALLERYIMG="no">

this piece will stop the IE6 toolbar when you put your mouse over the
picture

may help a little bit
 
Back
Top