animated gif in iframe doesn't animate first time frame is displayed for long running process

T

TS

I have a page that executes a method that takes a long time and i have an
iframe that displays an progress bar animated gif while the page is running.
The first time you hit it, it doesn't animate. The second time you try, it
starts animating. I can be on my aspx page and onload have the iframe
navigate to the correct page, so i would think that the gif would be loaded


Anyone know why?
 
T

TS

I figured it out. When the host page posts, all animated gifs stop
animating. You have to just reset the image's source to its own source after
the post. I used: setTimeout('ResetGifSource()',200);

This re-sets the source just after the submit happens (run in by
registerOnSubmit)

// reset the src to itself so that the animation will restart function
ResetGifSource() {
var img =
document.frames['progressBarFrame'].document.getElementById('Image1');
img.src = img.src;
}

As you can tell, i am displaying this status bar in an iframe
 
Joined
Dec 16, 2008
Messages
1
Reaction score
0
gif images dont animate on aspx page

Hello friend,

Its my first post on this forum . I hav problem regarding playing gif images on aspx page. I hav siply placed gif image and pressed f5 page loads but gif dont animate. Even i hav placed it in image control but it still not animate . What;s the problem can anyone please help me?
Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top