Hi!
Im using an image popup script on my gallery, but it’s not mine, so I have trouble figuring out how to disable rightclicking.
Is there anyone who is willing to help me out here? any help will be gladly taken ?
Below is the script I’m using in <head>:
function image_open(image_loc,img)
{
HTML = “<html><style>body{margin:0px 0px 0px 0px}</style><body onBlur=’top.close()’><img src='”+ image_loc +”‘ border=0 name=load_image onLoad=’window.resizeTo(document.load_image.width+10,document.load_image.height+60)’></body></html>”;
popupImage = window.open(”,’_blank’,’toolbar=no,scrollbars=no’);
popupImage.document.open();
popupImage.document.write(HTML);
popupImage.document.close();
obj_img = document.getElementById(img);
obj_img.src= obj_img.src;
}
I have trouble figuring out how to disable rightclicking.
[/quote]
they are watermarked
[/quote]
Kor - as Zazi said, his users aren't geeks nor pros! And PhotoShop, for one, is a pretty much advanced ? so...
If he wants to create a no-right-click page let him do so! If you want to complain on somebody - do so on those poor ******** who spent their time creating all those no-right-click-scripts in the first place! :p[/QUOTE]
Kor, I am ignoring you, please leave it!!!
[/quote]
now I just need to remove the image toolbar somehow[/quote]
<script language="JavaScript1.2">
/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visithttp://www.dynamicdrive.com
*/
var clickmessage="Copyrights do not allow this function."
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>[/QUOTE]
0.1.9 — BETA 6.17