I've been creating image objects in a loop and setting the onload attribute on each instance. It occurred to me that I should be able to set it for the Image object instead:
but I couldn't. "'Image.prototype' is null or not an object" At this point I am assuming that onload event handler cannot be added directly to the Image() object.
I started wondering then whether I could create an object based on Image() that would allow it's onload property to be set; something like:
I've thought about creating a whole new object with this.oImg = new Image() and an onload property in it, but ... that's for another exercise. This time around, I just want to know if it's possible to do something like what's described above. [ April 22, 2007: Message edited by: Roger F. Gay ]
Thanks Bear. I think I'll leave it alone, based on your comment. I can't help but think in practical terms anyway sometimes, even when I'm trying to go off on strange tangents for the learning experience -- and it has been getting a little difficult to feel that this is an interesing problem, given the minor impact (if any) that it would have on the actual functioning of what I've built.
Roger F. Gay
Joined: Feb 16, 2007
And BTW, I did learn something along the way. Thanks again.