Results 1 to 3 of 3

Thread: IE error when using Thumbnailviewer 2

  1. #1
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Smile IE error when using Thumbnailviewer 2

    1) Thumbnailviewer 2

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

    3) Hi i am using the thumbnailviewer2 script on a website 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">
    thumbnailviewer2.init();
    </script>
    <![endif]-->
    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,954
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    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:

    Code:
     defer="defer"
    from the external script tag:

    Code:
    <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
    ***********************************************/    
    </script>
    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:

    Attachment 3302

    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.
    Last edited by jscheuer1; 05-10-2010 at 09:24 AM. Reason: add altered script
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    azoomer (05-10-2010)

  4. #3
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •