I have a button to load images. When user clicks on it, it needs to bring back 6 images initially with an option to load more images. I am dynamically creating <table> and other necessary tags. I want to set onload event to every <image> tag. This is what I have so far.
But this function is not being called. Eventually, this function would be responsible to bring back the actual image. and each image block would be loaded dynamically and independently.
The code that I have posted is preparing the structure to host image. so what I want is when I have <image> element ready, I want to call a function to fetch the image and set it to this element. And I assume onload event of <image> element is best suited.
What does getImageElement() do?
Joined: Sep 12, 2008
I got it working using jQuery like this.
subject: Loading dynamic number of images dynamically and attach onload event listner