Forums
This topic is locked
cancel right mouse click for pictures
Posted 02 Apr 2003 18:09:08
1
has voted
02 Apr 2003 18:09:08 diego gonzalez posted:
hey , I need some help, I'bve seen in some web page , that you can't do right click and save the pictures, I've a web that has alot of pics and I don't want anybody stilling my work,
my page is done in flash and I've pop up's windows for the pictures.
Any one helpme please !!!!!!!!
Replies
Replied 02 Apr 2003 18:27:30
02 Apr 2003 18:27:30 Brent Colflesh replied:
A simple search in Google will reveal various schemes for stopping image theft - most of which only work in IE...
Be aware that it is not possible to stop images that have been rendered in a browser from being extracted client side.
Regards,
Brent
Be aware that it is not possible to stop images that have been rendered in a browser from being extracted client side.
Regards,
Brent
Replied 03 Apr 2003 08:05:15
03 Apr 2003 08:05:15 Vince Baker replied:
Place this in the head of your document to disable the right click
<script language="JavaScript">
<!--
var popup="Sorry, right-click is disabled.\n\nThis Site Copyright
©2000";
function noway(go) {
if (document.all) {
if (event.button == 2) {
alert(popup);
return false;
}
}
if (document.layers) {
if (go.which == 3) {
alert(popup);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=noway;
// --> </script>
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
<script language="JavaScript">
<!--
var popup="Sorry, right-click is disabled.\n\nThis Site Copyright
©2000";
function noway(go) {
if (document.all) {
if (event.button == 2) {
alert(popup);
return false;
}
}
if (document.layers) {
if (go.which == 3) {
alert(popup);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=noway;
// --> </script>
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 03 Apr 2003 18:10:41
03 Apr 2003 18:10:41 diego gonzalez replied:
thanx vince, but can you be more specific where I've to put this code???
I'm doing this in flash not in dreamweaver, and I have pop up's windows for each pic
I'm doing this in flash not in dreamweaver, and I have pop up's windows for each pic
Replied 26 Apr 2003 18:16:16
26 Apr 2003 18:16:16 Melanie Caughron replied:
I worked at a place where we would have to find logos, and for the most part there are ways around any javascript to disable right click. So what ever you choose it will NOT be 100% foolproof.
Replied 24 May 2003 09:10:39
24 May 2003 09:10:39 Kelley B replied:
put this script in your head section
it will not display any message that it has been disabled either
<script language=JavaScript>
<!--
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false"
// -->
</script>-->
if you are also using windows XP you may like to add this meta tag as well
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
this will stop the XP floating print / download popup from loading
regards kelley
it will not display any message that it has been disabled either
<script language=JavaScript>
<!--
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false"

// -->
</script>-->
if you are also using windows XP you may like to add this meta tag as well
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
this will stop the XP floating print / download popup from loading
regards kelley
Replied 24 May 2003 14:42:00
24 May 2003 14:42:00 Owen Eastwick replied:
Be aware that disabling the right click won't stop anyone copying your images, if the image is displayed in the browser it will be in the clients temporary internet files folder on their hard drive.
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Replied 29 May 2003 17:10:52
29 May 2003 17:10:52 Lee Diggins replied:
Hi
How about this.
I remember posting an answer using similar code to Vince's and Kelley's to the same question on tek-tips, disabling right click. A user came in saying to bulky for me try this:
<script>
<!--
document.oncontextmenu = new Function("return false"
;
//-->
</script>
Wicked!
Supra was his screen name - forgot to add that!
Digga
Sharing Knowledge Saves Valuable Time!!!
Edited by - Digga the Wolf on 29 May 2003 17:11:47
How about this.
I remember posting an answer using similar code to Vince's and Kelley's to the same question on tek-tips, disabling right click. A user came in saying to bulky for me try this:
<script>
<!--
document.oncontextmenu = new Function("return false"

//-->
</script>
Wicked!
Supra was his screen name - forgot to add that!
Digga
Sharing Knowledge Saves Valuable Time!!!
Edited by - Digga the Wolf on 29 May 2003 17:11:47