AllExperts > Geocities Webpage Creator (HTML) 
Search      
Geocities Webpage Creator (HTML)
Volunteer
Answers to thousands of questions
 Home · More Geocities Webpage Creator (HTML) Questions · Answer Library  · Encyclopedia ·
More Geocities Webpage Creator (HTML) Answers
Question Library

Ask a question about Geocities Webpage Creator (HTML)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Katie Bischoff
Expertise
I have been making webpages for 5 years. I have worked with everything from Geocities to Dencity to CuteHTML. I can answer almost any question you have, be it about programming in general or different programs to use.

Experience
I have been making websites for 5+ years, and I currently run 10 different sites. I went from having a site on Geocities to having my own domain, and in the process I've used quite a few different programs to ccomplish what I wanted.
 
   

You are here:  Experts > Internet/Online > Personal Web Pages > Geocities Webpage Creator (HTML) > Photo security

Geocities Webpage Creator (HTML) - Photo security


Expert: Katie Bischoff - 6/24/2001

Question
I was wondering if you could tell me how to keep people from right-clicking on my photos and copying them for their own use.
What do I need to do to stop this?

Thanks for your help.
Heather

Answer
Put this code between your <head></head> commands:

<SCRIPT language="JavaScript">
<!--
var sorry="Sorry, right-click is disabled."

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(sorry);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(sorry);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</SCRIPT>

There is a catch however.  This code only works in Internet Explorer (Netscape doesn't support any sort of right-click disabling code).

-Katie

View Follow-Ups    Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.