I found a useful JavaScript for website when you right click, an alert message pops up. This prevent the viewer from copying images on your website. Of course there's ways around it.
I know many of you this script isn't anything new but this script works in MS Internet Explorer but not in my Mozilla Fire Fox.
Here's the script. I kept the source from where I got it intact because its good practice to state your source.
/*
Thank you for choosing Java-scripts.net
as your javascript resource site. Below
is the free javascript code that you requested
along with installation instructions. We
look forward to seeing you again at
http://www.java-scripts.net
===============================
Script Details
Title: No Right Click
Description: Disable right clicking on your site to prevent people from stealing your images and code!
===============================
Copy the following code into your HEAD tags.
===============================
No rightclick script v.2.5
(c) 1998 barts1000
barts1000@aol.com
Don't delete this header!
*/
var message="\nImages are property of RR\nImages and Text protected!\nALL RIGHTS RESERVED";
// Don't edit below!
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
} if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) { document.captureEvents(Event.MOUSEDOWN); }
document.onmousedown=click;
Does anyone know the JavaScript that works both in IE and FireFox?
I know many of you this script isn't anything new but this script works in MS Internet Explorer but not in my Mozilla Fire Fox.
Here's the script. I kept the source from where I got it intact because its good practice to state your source.
/*
Thank you for choosing Java-scripts.net
as your javascript resource site. Below
is the free javascript code that you requested
along with installation instructions. We
look forward to seeing you again at
http://www.java-scripts.net
===============================
Script Details
Title: No Right Click
Description: Disable right clicking on your site to prevent people from stealing your images and code!
===============================
Copy the following code into your HEAD tags.
===============================
No rightclick script v.2.5
(c) 1998 barts1000
barts1000@aol.com
Don't delete this header!
*/
var message="\nImages are property of RR\nImages and Text protected!\nALL RIGHTS RESERVED";
// Don't edit below!
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
} if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) { document.captureEvents(Event.MOUSEDOWN); }
document.onmousedown=click;
Does anyone know the JavaScript that works both in IE and FireFox?