PDA

View Full Version : Problem with Thumbnail Enlarge!



rfulton13
12-22-2009, 06:59 PM
Just wondered if anyone has a fix for this.

I am using a version of the :: Image Thumbnail Viewer II. I have a number of images on the right hand side of the webpage and they appear larger in a div when they are clicked on.

It seems to work fine of my computer. However, when I try it on other computers the image appears briefly in the div but then links to a new page with the picture in it.

http://www.electronicpets.org/zhu-zhu-pets-hamsters~p20.html

Any ideas what this could be? Your help would be much appreciated.

Nile
12-22-2009, 07:05 PM
This is what I'm getting, is it not what you want?:
http://www.screencast.com/users/Nile/folders/Jing/media/f7659df0-b6c1-4ebe-8811-29a7305cfa68

rfulton13
12-22-2009, 07:15 PM
Wow, that was quick. Thank you for your reply.

What you have filmed is what I am getting as well. I briefly changed it to a mouseover function and have changed it back now so that you click the smaller images to bring up a bigger one.

Unfortunately on many computers when the small image is clicked it seems to link to a new page with the image on it. (This is not related to the popup box which appears when the large image is clicked)

Do you know if this is a problem with my code or a conflicting java problem. The computers I've tried have all been IE so I don't really understand what's happening.

It seems to interpret the code correctly and display the picture but then afterwards it loads the new page.

jscheuer1
12-22-2009, 07:55 PM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

Warning: Please include a link to the DD script(s) in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

That said, since it's IE, you might try getting rid of defer="defer":


<script type="text/javascript" src="thumbnailviewer2.js" defer="defer">

/***********************************************
* Image Thumbnail Viewer II script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

</script>

from the script tag. This often helps with problems in this script in IE and has no effect on other browsers. Another thing would be to set a return false on the links to prevent their firing before the script initializes, ex:


<a href="images/020_gogohamster_1.jpg" onclick="return false;" rel="enlargeimage::click"

But it may be another script on the page changing the return value. Try it without any other scripts and see if that fixes it. If so, we will have to find which script is causing it.

rfulton13
12-22-2009, 08:10 PM
Script: DD Tab Menu
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

Sorry about that, never done posting here before. I made the changes that you suggested but still finding the same problem on my second laptop.

I've tried removing all other scripts but it seems to bypass the onclick="return false;"

rfulton13
12-22-2009, 09:20 PM
Ha! Fixed it. It seems there is a conflict with McAfee. It didn't like the return false. Once I disabled it on the browser, the images worked again.

Is there a workaround for this?

jscheuer1
12-23-2009, 03:33 AM
If the script is working, you don't need:


onclick="return false;"

But if that, or the attached return false that the script makes for onclick activation causes problems with McAfee, then McAfee will break a very, very great number of scripts.