Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

noright click in popup image 2

Status
Not open for further replies.

CleverT

Technical User
Jul 30, 2001
2
CA
Hello, I am building a showcase for my artwork and am using your popup window for showing larger versions of the little thumbnails. I wish to deter right clicking on the popups. I trying four different scripts from other places,
The noclick works on the page itself but unnecessary, I am trying to make it noclick on the popup image instead.
Does anyone have any ideas?
the page in question is I really enjoy the pop up script (from JSC). thank you

(I tried the script in the " pimg.htm" code to no effect)
 
hi!

unfrotunately, i can't help u with ur questions, but

ur art is really beautiful, i think some of the pics would look perfect in fairy-tale books... really nice.
good luck!
Avendeval


 
CleverT,

place the no right-click script in the html document opening with the larger version of your images. Hope it helps ;)

~ jsLove
 
I was was limited to javascript to protect my images, i would not use pop-ups. I would have the image they clicked swapped on the page, along with the no right click. Like this:

Code:
<html>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--//
function sayHello(message)
{window.status=message;}
//-->
</SCRIPT>
<body bgcolor=&quot;#ffccff&quot;>
<table border=&quot;2&quot;>
<tr>
<td>
<!---PUT ALL YOUR THUMNAILS HERE IN THIS FORMAT-->
<a href=&quot;javascript:sayHello('Hello World (Small)')&quot; OnClick=&quot;window.status='Hello World';document.images['hello_small'].src='image/hello_s_orange.gif';document.images['hello_big'].src='image/WORLD.gif';return true&quot;><img src=&quot;image/hello_s_orange.gif&quot; name=&quot;hello_small&quot; border=&quot;0&quot;></a>
</td>
<td>
<a href=&quot;javascript:sayHello('Hello World (Big)')&quot; OnMouseOut =&quot;document.images['hello_big'].src='image/HELLO.gif';return true&quot; OnClick=&quot;window.status='Hi, Mom';document.images['hello_big'].src='image/WORLD.gif';return true&quot;><img src=&quot;image/HELLO.gif&quot; name=&quot;hello_big&quot; border=&quot;0&quot;></a>
</td>
</tr>
</table>
</body>
</html>

This should do it, but you still can't beat good ole' CGI image protection.
 
It very simple - if a user can see your image, then it's already been downloaded to their PC. All they need to do is save it to another location if they want to keep it. No amount of alerts/disable right-clickingm etc. will help. If you want to better protect your images, among the things you can do is

- put a watermark on the main images
- only display low quality large images. If someone wants one, then they can mail you a request.
- Put all your images inside a Java applet slide-show
- Put all your images inside a shockwave/flash slideshow.

Greg.
 
By the way, your right-click script doesn't work if I press both mouse buttons at the same time :)

Greg.
 
Greg has a point -- watermarks are the only real secure way to display your images. Java would work but will bring you down in the end. Flash is also good. Both of these can be rendered useless by a screen shot though.

A good no-right-click script and some cgi image location hiding is probably the best you can do otherwise. There isn't a way to disable screen-shots, and anything you want the user to see will be downloaded onto their computer. Chance are that if they knew to check the source code for the image location(what the cgi prevents), they are definitely going to know to check their temp. internet files too.

I've seen software that hides your copyright, or some other sort of water mark, digitally in your images. You might try that. Usualy these are too small to see, so someone could use the image on their page anyway -- until you find them.
 
Here is a good way with no alert, they just don't get any menu. Just put this in the head of you pop-up windows or link the javascript to those pop-up windows.

<script language=JavaScript>
if (window.Event) // Only Netscape will have the CAPITAL E.
document.captureEvents(Event.MOUSEUP); // catch the mouse up event
function nocontextmenu() {// this function only applies to IE4, ignored otherwise.
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e) { // This function is used by all others
if (window.Event) { // again, IE or NAV ?
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3) {
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
</script>

Let me know if this help,
Venomdesign

 
thanks y'all!
I figured out how to build a theft deterrent art showcase. I used JavaScript Corral's openPopWin. I wrote an HTML page for each piece onto which I placed a table where the art is the background and a transparent gif covers it! I also watermarked each piece. I did not bother with the noright click script. Here is the link that really helped:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top