I have a grid of images (3x3) that need to be updated periodically. Each image is loaded independently through an ajax callback method, like this:
for (var i=0; i < numImages; i++) {
Dajaxice.loadImage(callback_loadImage, {'image_id':i})
}
The function callback_loadImage() places the image in its designated spot within the grid.
The issue arises when some images load faster than others but the browser does not display any images until all ajax calls are complete. If one call times out, nothing is shown until that specific image request fails.
This behavior varies across browsers, with some showing images as they load while others wait for all images to finish loading before displaying anything.
My current setup includes:
- Django 1.3 (Python 2.7)
- Windows x64 server for testing purposes
- Dajaxice for ajax functionality
I am willing to modify my code structure if necessary.
Any feedback or recommendations would be greatly appreciated.