Forum Moderators: open
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</head>
<body>
<a href="javascript:;" onClick="MM_openBrWindow('battery.jpg','Page2','width=500,height=500')">Click Image</a> (Right click)<br><br>
</body>
However, I want to add the script in <head> as below for disable right click on the new open browser,
<SCRIPT language=JavaScript>
var message = "function disabled";
function rtclickcheck(keyp){
if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE")!= -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>
The problem is how I include the function rtclickcheck()in the new open browser?
This won't stop anyone copying your images however as there are many many ways to get around it. Mac users for example don't even have a right-mouse button but can still copy images ;)