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