Solved

Animated gif stops after click

Posted on 2002-06-06
6
1,189 Views
Last Modified: 2013-11-19
I put animated gif inside <a href> tag to open a web dialog. The gif stops its animation after the mouse click.
How can i avoid this stop?
0
Comment
Question by:galor
6 Comments
 
LVL 14

Expert Comment

by:avner
ID: 7058717
You cannot, as long as you use a modal popup the web-engine stop responding untill you come back from the modal window/popup.
0
 

Author Comment

by:galor
ID: 7058738
The problem is that it does not restart the animation after the popup window is closed.
Any suggestion?
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7058967
Reload the gif when you come back from the popup.

if the image is:

<img name="thegif" src="myimage.gif">

Then document.images['thegif'].src="myimage.gif";

Should restart it.

Though you might have to actually clear it with:
document.images['thegif'].src="";
document.images['thegif'].src="myimage.gif";

There should not be a deley reloading because it will be in cache.

Cd&

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Accepted Solution

by:
ahosang earned 200 total points
ID: 7059066
You may be using something like:
<a href="javascript:yourFunction()"> which is deprecated
or :
<a href="#" onclick="yourFunction()">

The way to stop javascript from messing with animated gifs(and the best way in any case) is:
<a href="#" onclick="yourFunction();return false">
0
 

Author Comment

by:galor
ID: 7059384
Very good. It is working!
0
 
LVL 12

Expert Comment

by:ahosang
ID: 7059922
Glad to help
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question