...

View Full Version : Having trouble getting no right click to work in a pop up window..



Freddie1275
03-15-2004, 01:24 AM
Hi. My site freddien.com is a personal page for me mostly to put my pictures on. I have a picture album java script on there and it opens a picture to its full size when the thumbnail picture is clicked. The problem im having is that when the regular size picture is loaded in the pop up window it allows users to right click and they can get the images off my site. I was wondering if someone could help me fix this so that wont happen. Below i will post the part of the script that dose the pop up window. If you dont understand what i mean please view the scripted located on my page at www.freddien.com/photoalbum/photoalbum.html


}
function SuzyPicRemote(picName) { // Pops up the photo in a remote window.
ShowingImage = new Image();
ShowingImage.src = picName;
wid = ShowingImage.width + 50;
hei = ShowingImage.height + 60;
if (wid < 30 || hei < 30) {
wid=650;
hei=490;
}
if (screen.width < wid || screen.height < hei) {
wid = screen.width - 50;
hei = screen.height - 50;
}
OpenWindow = window.open("", "remoteWin", "resizable=1, scrollbars=1, toolbar=0, left=15, top=10, width=" + wid + ", height=" + hei);
OpenWindow.document.open();
OpenWindow.document.write('<html><head><title>' + ActiveArray[current].TitVal + '</title></head>'
+ '<body style="background:url(parchment.jpg); font:8pt verdana; margin:2px"><center>' + ActiveArray[current].DatVal + '<br>'
+ '<img src=' + picName + '><br>' + ActiveArray[current].TxtVal
+ '<br><a href="javascript:window.close();">close window</a></center></body></html>');
OpenWindow.document.close();
}

Below is my no right click script

<script language="JavaScript">
IE4plus = (document.all) ? true : false;
NS4 = (document.layers) ? true : false;

function clickIE()
{
return false;
}

function clickNS(e)
{
if (e.which==2 || e.which==3)
{
return false;
}
}
if (!IE4plus)
{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=clickNS;
document.onmouseup= clickNS;
document.oncontextmenu=clickIE; // For NS 6+
}
else
{
document.onmouseup= clickIE;
document.oncontextmenu=clickIE;
}

</script>

Thanks Freddie

glenngv
03-15-2004, 01:47 AM
You can't really protect the images on the site. Blocking source codes by means of disabling right click and any other means has been discussed extensively in this forum. Refer to the "block source codes" link in my sig.

If you really want to protect your images, put a watermark in the images.

Freddie1275
03-15-2004, 01:49 AM
Im not trying to keep them extra safe or anything like that and dont want water marks ect... All i want is so when that window pops up u cannot right click in that window. Theyc an still view the source if they want thats ok. I just need to know how to add no right click to the window that pops up with the big picture.. Someone please help.

glenngv
03-15-2004, 02:25 AM
That would pose a big accessibility problem since right-clicking the mouse in the document provides several menus with different functionalities in it.

Freddie1275
03-15-2004, 02:43 AM
Again, my site is not commerical its private for me and a few others. I dont care about menu ect.... Can someone just tell me how i would add it.

glenngv
03-15-2004, 03:07 AM
<img src="..." oncontextmenu="return false">

You may want to also prevent the IE6 image toolbar that displays when you mouse over images.

<meta http-equiv="imagetoolbar" content="no" />

Willy Duitt
03-15-2004, 03:21 AM
No wonder you want to disable right clicking and view source.
You don't want people to see that you are violating their copyrights by removing the credits from the scripts you are using. :rolleyes:

Do these credits for your picture show look familar?
Which is on your page and the credits are removed.


<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Original: Susan K. (kitykity@hotmail.com) -->

<!-- Web Site: http://www.kitykity.com/photoalbum -->

<SCRIPT LANGUAGE="JavaScript"> var javascript_version = 1.0;</SCRIPT>

<SCRIPT LANGUAGE="JavaScript1.1"> javascript_version = 1.1;</SCRIPT>



<script language=javascript>

/**********************************************************

* Suzy's Javascript Photo Album, version 5.5, March 2, 2003

*

* Changed this version: can now use HTML tags in picture description.

*

* This javascript code may be used on other Websites if:

* 1) This notice is left unchanged.

* 2) A link to http://www.kitykity.com is placed on that page.

* Please search the FAQ for answers to common problems and questions.

* You may contact me at kitykity@hotmail.com for assistance.

*

**********************************************************/

A link to the script provider can be found below.
http://javascript.internet.com/miscellaneous/kitykity's--photo-album.html
I suggest you return the credits to the page as you agreed to when you used the script.

.....Willy :mad:

Edit: Tried to fix the link and I may as well add the O/P's link
http://www.freddien.com/photoalbum/photoalbum.html

Freddie1275
03-15-2004, 03:46 AM
Maybe if you would know that i sent the lady 10 dollars to get her tags off.? You just jump to think ignorant stuff.. GO to her homepage and if you donate you can remove tags... Now do you know how to fix my problem?

glenngv
03-15-2004, 03:58 AM
I already provided you with the solution in my above post.

Freddie1275
03-15-2004, 04:04 AM
Thanks glenngv it worked great. But is there also a way i can make it so they cant right click the page the image is on? If not its ok but thanks again

glenngv
03-15-2004, 04:45 AM
It's possible but it's better to leave it like that.

Willy Duitt
03-15-2004, 06:16 PM
Originally posted by Freddie1275
Maybe if you would know that i sent the lady 10 dollars to get her tags off.? You just jump to think ignorant stuff.. GO to her homepage and if you donate you can remove tags... Now do you know how to fix my problem?

Well I looked thru the authors site and although there was a "Would you like to donate" paypall link. There was no mention of removing the credits if you donated. Although I can not understand why the author would agree to removing the credits in return for a donation. I suppose it is very much possible that this is included in a "Thank You for your donation" confirmation.

Either way, I emailed the author and requested clarification.
If and when I recieve a reply. I will post the results.

.....Willy

Freddie1275
03-15-2004, 07:07 PM
Alright thats fine. You just made your self look stupid and your trying to find a way to cover it up.

Willy Duitt
03-15-2004, 07:40 PM
Originally posted by Freddie1275
Alright thats fine. You just made your self look stupid and your trying to find a way to cover it up.

Freddie;

I recieved a reply and your donation does not grant you explicit permission to remove the credits.

In part the Author states:
(I will post the entire response once I recieve permission to do so)

Since the page is not being used for a commercial purpose, I do not have a problem with him removing the credit from showing on the page. If a link is still commented in the code, that is just fine.

Although the author does not seem to mind you removing the credits. She does expect that you leave a link to her site either in the script or on your page.

Please make the appropriate changes as soon as possible.

.....Willy

JohnKrutsch
03-15-2004, 07:44 PM
This thread look as if it has served its purpose. I am going to close it now to avoid any further conflict.

Accusations and backlashing are not the kind of things that make this a productive forum.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum