Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: :: Ultimate Fade-in slideshow - empty first image in IE8

  1. #1
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default :: Ultimate Fade-in slideshow - empty first image in IE8

    1) Script Title: :: Ultimate Fade-in slideshow (v2.1)

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

    3) Describe problem: In IE8 the first image does not show unless the page is refreshed (ctrl F5). If you go to another page and then back again randomly the first image will show. Click the next button it moves to image 2 and if you go back the first image is there. It works in every other browser but IE8.

    Any help greatly appreciated


    http://www.braycottages.com/test/christmas.htm and click on photo gallery

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

    Works OK here in IE 8 on both the demo page on Dynamic Drive and on the gallery page from the page you link to. It did seem to take a little more time perhaps to load up the first image than might other browsers, but it did. You may always optimize your images to decrease the time required for this.

    Are you sure your IE 8 is up to date? Are you allowing it to pick the display mode which it feels best suits the page, or do you have it set to display in IE 7 or quirks mode? My IE 8 chose to use IE 8 Standards and, as I say worked fine. You can use a meta tag to force IE 8 Standards mode:

    Code:
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    If you do, it should be the very first meta tag on your page.
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Thanks for the reply. It's not just my IE8, It's the same for my client and also on other machines i've tested it on. I have already optimised the images as much as I can.

    Added the meta tag, didn't make any difference

  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

    Do you have the same problem on the demo page on Dynamic Drive?
    - John
    ________________________

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

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

    Wait a minute, I'm having the opposite problem from what you describe. If you navigate away and then use the back button, then you need to refresh. But this is not happening on the Dynamic Drive Demo, just your page. You may want to turn persist on, but this is just a fudge, there must be some underlying problem.
    - John
    ________________________

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

  6. #6
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    No the demo page is fine which is really stange. I just can't spot anything wrong.

  7. #7
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I've spent about 3 hours on this so far, put it in a table, out of a table, in and out of divs, changed doc type, content type, disabled caching.......the list goes on

    Thanks for your help on this

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

    Default

    Hmm this is a strange one. The script by design will start the slideshow when the first image has fully loaded. From the look of your page, it seems IE doesn't always signal when that happens, despite the fact that the script contains code that should have accounted for that bug. What happens if inside the .js file, you replace the following:

    Code:
    		if ($curimage.get(0).complete){ //accounf for IE not firing image.onload
    			$loadingimg.hide()
    			slideshow.paginateinit($)
    			slideshow.showslide(setting.curimage)
    		}
    		else{ //initialize slideshow when first image has fully loaded
    			$loadingimg.hide()
    			slideshow.paginateinit($)
    			$curimage.bind('load', function(){slideshow.showslide(setting.curimage)})
    		}

    with just:

    Code:
    			$loadingimg.hide()
    			slideshow.paginateinit($)
    			slideshow.showslide(setting.curimage)
    DD Admin

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

    west05 (10-08-2009)

  10. #9
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Yes it seems to work with that code. Obviously no fade on the first image but I can live with that

    Thanks

  11. #10
    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

    DD, I find it odd that you appear to think IE 8 doesn't fire onload of images. Do you?

    I've tried this various ways (hard coding to the tag, hard coding to injected HTML, etc. without being able to find IE 8 lacking, here's one fairly obtuse method, IE 8 still fires the event:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
    jQuery.noConflict();
    jQuery(function($){
    var i = new Image();
    $(i).bind('load', function(){alert('loaded, width: ' + this.width);}).attr('src', 'http://i26.tinypic.com/11l7ls0.jpg');
    });
    </script>
    </head>
    <body>
    <div id="test">
    
    </div>
    </body>
    </html>
    Last edited by jscheuer1; 10-09-2009 at 02:45 AM. Reason: add demo
    - 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
  •