S
Steven Choo
Hi , I'm a beginner to all this so please bear with me. I would like
to disable right clicking on an enlarged image that appears in a popup
when a thumbnail is clicked. I have tried to amend this free add-in
but it haven't got it to work. Can anyone help? Much appreciated.
<script language="JavaScript">
<!--
function spawnJimcoPopup(url, name, options, w, h, x, y, scaleType)
{
var windowOptions;
if (scaleType == 'percent')
{
w = (w * screen.availWidth) / 100;
h = (h * screen.availHeight) / 100;
}
if (x == 'center')
{
x = (screen.availWidth - w) / 2;
y = (screen.availHeight - h) / 2;
}
windowOptions = options + ',width=' + w + ',height=' + h + ',left='
+ x + ',top=' + y;
newWindow = window.open(url, name, windowOptions);
newWindow.document.open();
newWindow.document.write("<html><head><title>Enlarged
Picture</title></head>");
newWindow.document.write("<body oncontextmenu='return false'
onselectstart='return false' ondragstart='return false'
bgcolor='#FFFFFF' text='#000000' topmargin=5 LEFTMARGIN=5
MARGINHEIGHT=5 MARGINWIDTH=5>");
newWindow.document.write("<p align=center><a
onclick='window.close()'><img src=" + url + " alt='Click on pic to
close' border='0'></a></p>");
newWindow.document.write("</body></html>");
newWindow.document.close();
newWindow.focus();
}
//-->
</script>
to disable right clicking on an enlarged image that appears in a popup
when a thumbnail is clicked. I have tried to amend this free add-in
but it haven't got it to work. Can anyone help? Much appreciated.
<script language="JavaScript">
<!--
function spawnJimcoPopup(url, name, options, w, h, x, y, scaleType)
{
var windowOptions;
if (scaleType == 'percent')
{
w = (w * screen.availWidth) / 100;
h = (h * screen.availHeight) / 100;
}
if (x == 'center')
{
x = (screen.availWidth - w) / 2;
y = (screen.availHeight - h) / 2;
}
windowOptions = options + ',width=' + w + ',height=' + h + ',left='
+ x + ',top=' + y;
newWindow = window.open(url, name, windowOptions);
newWindow.document.open();
newWindow.document.write("<html><head><title>Enlarged
Picture</title></head>");
newWindow.document.write("<body oncontextmenu='return false'
onselectstart='return false' ondragstart='return false'
bgcolor='#FFFFFF' text='#000000' topmargin=5 LEFTMARGIN=5
MARGINHEIGHT=5 MARGINWIDTH=5>");
newWindow.document.write("<p align=center><a
onclick='window.close()'><img src=" + url + " alt='Click on pic to
close' border='0'></a></p>");
newWindow.document.write("</body></html>");
newWindow.document.close();
newWindow.focus();
}
//-->
</script>