Solved

Animated gif stops after click

Posted on 2002-06-06
6
1,192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
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

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

627 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