Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Animated GIF stops with new request

 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I wanted to display an animated GIF to when the user clicks on a specific links which redirects to a very heavy action that takes a lot of processing. The GIF is just a simple image to tell the user that the requested page is loading. Unfortunately, when the link is clicked on, the image is displayed, but not animated.

I know that I can simply create a script that displays a series of images in an infinite loop until the new response is received, but I don't like this solution. Is there any other solution for this?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All browsers have settings that prevent animations from being played. Maybe yours is set not to animate?
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, this is not the issue. Animated GIFs work fine in my browser, and I actually solved the problem partially. It now works on IE only, and I need to find a solution for FF. What I did to let it work in IE is reloading the source of the image using javascript, after calling the new location of the document. An example code can be found I put the code I used below, which I got from here.

I now need a solution for firefox

 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the image somewhere publicly accessible so one can take a look at it?
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the late reply. It's a smaller version of this gif. I got it from ajaxload.info. It's called "Indicator lite" there.
[ February 17, 2008: Message edited by: Alaa Nassef ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this:
http://www.mredkj.com/vbnet/AnimatedGifOnPostback.html

Eric
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Eric,

Thanks for the website, but it's basically the same trick I did, and that is updating the image source after the action that stops the animation is initiated. This works in IE only, not FF.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64852
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most browsers will stop animations upon submission. If you want to keep the display active while a request is being processed you might want to consider making the request using Ajax.
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guys. I just hoped that there would be a workaround for firefox like the one in IE.
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guys. I just hoped that there would be a workaround for firefox like the one in IE.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic