Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts

    IE7/IE8 not loading more then 3 image objects

    I'm making a jQuery plugin to do image zooming, and in it, to determine the true height of the element (regardless of css), I'm doing the following for each image:

    Code:
    		var img = new Image();
    		img.onload = function () {
    			// Do stuff!
    		}
    		img.src = $oImg.attr('src');
    Unfortunately, in the current test (with 35 items), its only going through 3, then not loading any more (I did a console.log in the onload and it only give me 3 of the ids).

    Does anyone have any thoughts/advice on this one?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,965
    Thanks
    79
    Thanked 4,429 Times in 4,394 Posts
    Can you show it live?

    But I sure hope you don't mean you are doing it exactly that way, instead of using an array.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,965
    Thanks
    79
    Thanked 4,429 Times in 4,394 Posts
    Oh, and I don't use jQuery, but I've done this kind of things for the last 6 years in creating slide shows, and it has worked with up to over 20 images, at least. And at the time I first did it, I was using MSIE 7. Maybe even started with IE 5, I think.

    [I used it to start animations after all images were loaded...so I'd put an onload event on each new Image that simply went to a counter, and when the counter saw that all were loaded it started the animation.]
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Unfortunately, my new job does all dev work internally, so I can't put up the live project, but I will try to copy it over when I can get to the code on Monday.


  •  

    Posting Permissions

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