Click to See Complete Forum and Search --> : Pop up Images - Need help


evstar_deluxe
03-12-2005, 02:02 AM
hihi

was wondering if anybody could help me??


Im currently running a site with images using the script:

<
<SCRIPT LANGUAGE="JavaScript">
<!-- BEGIN
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=0,width=420,height=420,left = 200,top = 50');");
}
// END -->
</script>
>

<end script>


in my header, and this in the body of my page to call up larger pop up images:


<

<TD ALIGN="CENTER" WIDTH="150"><A HREF=" javascriptopUp('%%URLofImages%%%%UserFieldTwo%%,
border=0')">%%image%%</A></TD>

<end script>


I am using this in conjunction with agora cart, fo rthose of you who may be familiar with it. (this means I have the first bit of script in my store_header.inc file, and the later in my productPage.inc file)


Unfortunatly these images are patterns which I am selling online (Patchwork Patterns to be precise), and because I am giving larger images so that customers can view them, they could also right click, copy and save them.

I've inserting some extra javascript into the second bit of code listed above, to stop the right click option, but it also seems to disable the pop up function all together.

Can anybody give me some advice??


:confused:


p.s.

No right click script used was:


<
<script language="JavaScript1.2">

var clickmessage="Right click disabled on images"

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>



<end script>

scragar
03-12-2005, 05:21 AM
the quick solution is to remove your pop-up script in favour of the target=_blank atribute of a link.

on the other hand I dislike no-right click scripts so you are recomended to get rid of it(give me the URL and I can get all your images URLS in a minimal time, I can then visit them and dowload them at will: see sticky on protecting a pages source)

evstar_deluxe
03-14-2005, 04:08 AM
Ive put in the target=_blank atribute, but do you know of any script i can use to make the image in this new window "no right click"? I can't find anything on the web that will work

Pittimann
03-14-2005, 04:14 AM
Hi!

Trying to protect your images is not worth any effort, just like scragar already pointed out. Everybody who wants to 'steal' them can do so, irrespective of how you try to protect them. If you want to avoid that people grab your images, simply don't put them online.

Cheers - Pit

evstar_deluxe
03-14-2005, 06:16 AM
yeah, ive found alot of docs on the web saying that it is impossible to stop people stealing pics, but without having them on my site I can't really sell the products. I know that dissabling right click is a relatively minor step to prevention, but the site is patchwork & patchwork patterns, etc, so a majority of users will be women who are not very computer/ internet savvy.

I know that this is not completely true for all users (and pigeon holing in a way), but anything is better than nothing.

evstar_deluxe
03-15-2005, 06:01 AM
hey scrager,


Ive tried using the target=_blank attribute, but still can't get the no right click to work. Do you know where abouts I need to place the code? I just cant get the no right click to be active in the new window.

scragar
03-16-2005, 07:45 AM
<a href="whatever.html" target="_blank">a link</a>

evstar_deluxe
03-16-2005, 10:58 PM
I know how to call the pop up window, but I can't get no right click to function in it. The javascript ive been using is placed in the <head> </head> tags of the file, which makes the page itself no right click, but not the pop up.

Im looking for any way to stop "right click and save", so ive even tried to create a rollover in the pop up, or a transparent cover, but can't figure out how to assign these attributes to the actual pop up itself