img.onload-function missfires (img.src undefined)
Posted: Tue Nov 30, 2010 4:34 pm
I have a img-preloader with an onload-function.
Only thing is, in IE it works great but in Firefox it doesn't.
As can be seen in the example below i have a dynamically generated image wich i need dimensions from.
As said in IE (from 6 to
no prob's, but testing in FF it fails.
Firebug keeps telling me 'alightBoxImage' is undefined.
I just can't figure out why!
Help...please!
Only thing is, in IE it works great but in Firefox it doesn't.
As can be seen in the example below i have a dynamically generated image wich i need dimensions from.
As said in IE (from 6 to
Firebug keeps telling me 'alightBoxImage' is undefined.
I just can't figure out why!
Code: Select all
imgPreloader.onload = (function(){
alightBoxImage.src = imageArray[activeImage];
resizeImageContainer(imgPreloader.width, imgPreloader.height);
});
imgPreloader.src = imageArray[activeImage];