View Full Version : IE error when using Thumbnailviewer 2

05-10-2010, 07:29 AM
1) Thumbnailviewer 2

2) http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm (http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm)

3) Hi i am using the thumbnailviewer2 script on a website (http://kenyatravels.com/photo-gallery/) and it was working fine until i added a lot of links in a menu. It stopped working in IE. Fine in other browsers. Then i added:
<!--[if IE]>
<script type="text/javascript">
at the end of the page and now the thumbnailviwer works again. The problem now is that i get an error message in the lower left corner in IE. This has only occured after adding menu links. Is there a way to make thumbnailviewer disregard links in a certain location ? Or another way to get rid of the error. I know that i am using far to many scripts on the page but when trying to debug it seems to be the menulinks causing the problem. Any help would be much appreciated.

05-10-2010, 08:05 AM
Has nothing to do with the Thumbnail script. Remove the DD script completely, and you will still have the error. It is simply an incompatibility with IE and one or more of the jQuery scripts.

Incidentally, there is a minor problem with the Thumbnail script, and this has come up before. Your solution will work, as will removing:


from the external script tag:

<script type="text/javascript" src="/wp-content/themes/KenyaTravels-Theme/photogallery/scripts/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

Although a standard attribute, this is only implemented by IE. It allows the browser to initialize the script sooner. But with so many other scripts on the page, it just doesn't work. Simply removing it will allow IE to initialize on page load. Your solution is probably better in that it would be faster.

But, as I say, the error has nothing to do with the Thumbnail script.

I'm attaching an altered copy of jQuery 1.4.2 min that will avoid the error:


The problem is probably with one of the scripts that uses jQuery or with your implementation of one of those scripts. If so, it would be better to find it there and fix it there. But it could be a glitch with jQuery itself, or even something else. However, since I've only added a try/catch to 'fix' the error, as long as the page works as expected in IE, it should be fine. It will not affect any script code or browser that wasn't having a problem before.

05-10-2010, 10:26 AM
Hi John
I implemented your jquery-1.4.2.min_plus.js and now everything is working perfect with no errors. I really appreciate your help. Thanks a lot. And thanks again for the great scripts.