Results 1 to 3 of 3

Thread: Image Thumbnail Viewer Issue

  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer Issue

    1) Script Title:
    Image Thumbnail Viewer

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

    3) Describe problem:
    I'm using this script for a page with 20-30 thumbnails. Everything works, but the problem is that I have to wait till all the thumbnails are loaded on the page before this script works. Otherwise, when I click on the image, it just opens the linked image as if there is no script. Only after all the thumbnails are loaded is when the script begins working. Is this a known issue or am I doing something wrong? Is there a way to fix this?

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    This is the designed behavior of the script, yes, to initialize itself after the page has fully loaded. You can get around that by removing the following line inside the .js file:

    Code:
    thumbnailviewer.dotask(window, function(){thumbnailviewer.init()}, "load") //Initialize script on page load
    Then, at the bottom of your HTML page (ie: right above the </body> tag), add the below:

    Code:
    <script type="text/javascript">
    thumbnailviewer.init()
    </script>

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

    john_t_03 (04-06-2008)

  4. #3
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks, this works. I still have to wait till the page loads, but at least it says "loading" and doesn't prematurely open an image. Great script, thanks.

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
  •