Results 1 to 3 of 3

Thread: Pre Load Image in Image Thumbnail Viewer II

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pre Load Image in Image Thumbnail Viewer II

    Hi Everyone,

    I have installed Image Thumbnail Viewer II and it works perfectly. Does anyone know how to have one of the enlarged images preloaded (without the mouse over or click) when the web page is loaded? So, when the page is loaded all the thumbnails and one enlarged image will be displayed.

    Thank you in advance!
    Gary

    ps. Thank you for the great scripts Dynamic Drive. All your hard work is greatly appreciated!

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    In js, you can do it with:
    Code:
    <SCRIPT LANGUAGE = JAVASCRIPT>
    if (document.images) 
    {
       img1 = new Image();
       img2 = new Image();
       img1.src = "imageName1.jpg";
       img2.src = "imageName2.jpg"
    }
    </SCRIPT>
    You could also do it with CSS. You let all your images load first.

    You may also find this links useful:
    http://www.netmechanic.com/news/vol3/loadtime_no6.htm
    http://www.javascriptkit.com/script/...oadimage.shtml
    http://www.hypergurl.com/generators/preloadimages.html
    http://www.ilovejackdaniels.com/css/...ages-with-css/

    See if it helps
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I think you mean have an image in the 'loadarea' when the page loads. If so, just hard code it:

    Code:
    <div id="loadarea" style="width: 500px">
    <img src="whatever.jpg">
    </div>
    In fact, you can put any HTML you like in there, image(s), linked image(s), link(s), text, etc. Anything that you put in there will be overwritten once the user activates the script, but until then, it will act as a placeholder - something to look at until the user starts clicking on or mousing over the triggers for the script.
    - John
    ________________________

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

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
  •