On 4/24/07, WebolizeR <[EMAIL PROTECTED]> wrote:


Hi;

I got an image like this <img id="myImage" src="flower.jpg" />

the src of this image will be changed by dynamically via ajax response

During AJAX response and after getting the new src of image, I need to
show the loading image instead of orjinal image.Problem is that when
new image is bigger,it gets time so loading image disappears but new
image not yet loaded...

How can I handle this?

tHanks...


Totally untested "out of my butt" theory:

Preload the "loading image" when the page loads.
http://www.netmechanic.com/news/vol6/css_no18.htm

Then on the ajax call:
First, put in the loading image.
Then in a hidden div append a node <img src="newimage.jpg"
onload="finishLoad()">
When that image loads, it should call the finishload function which moves it
to the non-hidden div.

Is that what you mean?  I might have misunderstood.

Load also has a callback function, but I'm not sure if waits for the image
to load.

Glen

Glen

Reply via email to