View Full Version : thumbnailviewer2 problem

08-06-2011, 08:21 PM
1) Script Title: thumbnailviewer2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnailviewer2.js

3) Describe problem: script not working, Chrome telling me the following:

43Uncaught TypeError: Cannot read property 'dsetting' of undefined
(anonymous function)thumbnailviewer2.js:43
(anonymous function)thumbnailviewer2.js:90
(anonymous function)thumbnailviewer2.js:83

...Have tried reinstalling the script multiple times from multiple sources, all to no avail. it just doesn't want to work at all. I'm new to JS, but as far as i can make out this is a problem with the script itself VS current Jquery?? Or not, i don't know - i just know that rather than having enlarged images open in #Loadarea, the brpwser is simply linking directly to the image URL. Have tried with my own code and code taken from your own and other people's working sites, and this also doesn't work.

Help please!!!


08-06-2011, 08:28 PM
Does it work for you on the demo page:


If so, it's something to do with the installation. To see the problem we would need a link to the page:

Please post a link to a page on your site that contains the problematic code so we can check it out.

If the demo page doesn't work for you, it's something with your browser and/or OS and/or other programs/hardware on or attached to your computer.

08-06-2011, 08:33 PM
Hi, it does. The page is a development model but can be found here:


..there are a couple of random inconsequential images knocking around because i wanted to just test someone else's code (e.g. from the demo) to see did that work any better. All of the little images on the right (in the collapsible bits) and the two up top should be causing an image to appear in the red outlined box on the right.


08-06-2011, 08:59 PM
The copy of the thumbnailviewer2.js file on the server is corrupt. It has at least one and possibly more added line breaks. Replace it with a fresh copy from the demo page. If you open it in an editor, make sure it's a text only editor like NotePad or SimpleText, and that line wrapping is turned off.

OK, that's only part the battle. On the page there are two external script tags for jQuery:

<link rel="stylesheet" type="text/css" href="http://moonunit.info/aptdev/wordpress/wp-content/themes/aptdev/js/carousel.css" media="all">

<script type="text/javascript" src="http://moonunit.info/aptdev/wordpress/wp-content/themes/aptdev/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://moonunit.info/aptdev/wordpress/wp-content/themes/aptdev/js/thumbnailviewer2.js">

* Image Thumbnail V . . .


<link rel="alternate" type="application/rss+xml" title="APT Architects &raquo; Homepage Comments Feed" href="http://moonunit.info/aptdev/homepage-2/feed/" />
<script type='text/javascript' src='http://moonunit.info/aptdev/wordpress/wp-includes/js/l10n.js?ver=20101110'></script>

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=1.4.2'></script>
<script type='text/javascript' src='http://moonunit.info/aptdev/wordpress/wp-content/plugins/collapsing-pages/collapsFunctions.js?ver=1.6'></script>
<link rel="EditURI" type="appli . . .

Get rid of the second one.

Just those two things and it 'works'. There are layout issues though, the enlarged image appears below the red outlined box. But you should be able to work that out, if not let us know.

08-06-2011, 09:09 PM
Aghhhh-hah!! thank you so much!! finally! :) Yeah, there's a bit of layout junk and some legacy bits in the header, but should be an easy fix (fingers crossed!).

Thanks again John, will post tomorrow once i've had another look. Now: party time.