Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: protect images from download



Well you are calling it on mouse down and mouse up.  That is twice :)

On Apr 20, 2008, at 1:50 PM, Robert Poland wrote:

Hi,

Thanks for all the advice I've received on this subject.

I have a script that works well enough for now, see sample XHTML below.

However when the "alert" is fired I have to click on it twice to get rid of it.

I have removed chunks of code but can't seem to cure it.

Any ideas?

.....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml"; dir="ltr">
<head>
<title></title>
</head>
<script language="javascript" type="text/javascript">
function right(e) {
var message="Sorry, this function is disabled. Borrowing the graphics from this site is a violation of copyright.";
if (navigator.appName == "Netscape" && (e.which == 3 || e.which == 2)) {
alert(message);
return false; }
else if (navigator.appName == "Microsoft Internet Explorer" &&
(event.button == 2 || event.button == 3)) {
alert(message);
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;
</script>
<body oncontextmenu="return false;">
<center>[ Try right-clicking the image and then the text link below ]
<p>
<img src="http://javascript.internet.com/img/tjsbutton.gif";>
<p>
<a href="http://javascript.internet.com";>Text Link</a>
<p>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com";>The JavaScript Source</a>
</font>
</center>
<p>
</body>
</html>



Bob Poland - Fort Collins, CO



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden



Lucas Holt email@hidden ________________________________________________________ MidnightBSD.org (Free OS) JustJournal.com (Free blogging)




_______________________________________________ Do not post admin requests to the list. They will be ignored. Web-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: protect images from download (From: Robert Poland <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.