Results 1 to 5 of 5

Thread: Image Thumbnail Viewer II :: Preload First Image

  1. #1
    Join Date
    Oct 2010
    Posts
    18
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer II :: Preload First Image

    1) Script Title:
    Image Thumbnail Viewer II

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem:
    How do I tell the script to preload my first image in the load area so when someone comes to the page they see the first image automatically?

    P.S. How do I mark a past thread as resolved?
    Last edited by itskimical; 11-09-2010 at 05:59 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    To make the status of the thread resolved:
    1. Go to your first post
    2. Edit your first post
    3. Click "Go Advanced"
    4. In the dropdown next to the title, select "RESOLVED"

    To have the image already there, in your rev put:
    Code:
    preload:yes
    Jeremy | jfein.net

  3. #3
    Join Date
    Oct 2010
    Posts
    18
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Didn't work. :o(

    That did not work.

    Here is the page
    [BROKEN LINK REMOVED]

    And here is the PHP Code. Just a side note - I had it converted to HTML with the images in PHP and I got the same outcome.

    PHP Code:
    echo "<div id=\"loadarea\" style=\"width: 600px\"></div>";
    if (!empty(
    $display_lgimage1))
    echo 
    "<a href=\"$urldir/$searchrow[LgImage]\" rel=\"enlargeimage\" rev=\"targetdiv:loadarea,preload:yes\"><img border=\"0\" src=\"$urldir/$searchrow[SmImage]\"/></a>";
    if (!empty(
    $display_lgimage2))
    echo 
    "<a href=\"$urldir/$searchrow[LgImage2]\" rel=\"enlargeimage\" rev=\"targetdiv:loadarea\"><img border=\"0\" src=\"$urldir/$searchrow[SmImage2]\"/></a>";
    if (!empty(
    $display_lgimage3))
    echo 
    "<a href=\"$urldir/$searchrow[LgImage3]\" rel=\"enlargeimage\" rev=\"targetdiv:loadarea\"><img border=\"0\" src=\"$urldir/$searchrow[SmImage3]\"/></a>"
    Last edited by jscheuer1; 11-15-2010 at 05:00 PM. Reason: broken link removed

  4. #4
    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

    Where you have, in the served source code:

    Code:
    <div id="loadarea" style="width: 600px" rev="preload:yes"></div>
    The highlighted is meaningless. It could go with the trigger links, example:

    Code:
    <a href="http://prettysmartcart.com/smartcart/images/Coat-3.png" 
    rel="enlargeimage" rev="targetdiv:loadarea,preload:yes">
    But it's the default anyway and has nothing to do with what you want. It just governs whether or not the larger images are preloaded so that they don't have to load when called for. This has nothing to do with what first appears in the loadarea div. That may and should if desired be hard coded:

    Code:
    <div id="loadarea" style="width: 600px; height: 351px;">
    <img src="http://prettysmartcart.com/smartcart/images/Coat-2.png" alt="" />
    </div>
    The height bit is optional, but will help the browser layout faster if known. In the case of various heights to images loaded in there, it will (if set large enough) prevent the page from jumping. I calculated it for that page only. It's the height of the images that will go in there. It should be the maximum height of the images (the tallest if there are various heights) that go in there, allow extra for the description, if used.

    You can put anything you like in there for the highlighted part. It will be overwritten as soon as one of the triggers is activated.
    Last edited by jscheuer1; 11-09-2010 at 06:14 PM. Reason: spelling
    - John
    ________________________

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

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

    itskimical (11-09-2010)

  6. #5
    Join Date
    Oct 2010
    Posts
    18
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    John - you are super duper great!!!!

    The third fix is what I needed!!!

    Thanks a TON!!!

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
  •