Click here to Skip to main content
15,914,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I having gif animation issue one some events. I am using jquery ui dialog

1. I just put gif image in div, and on every events, I just opened that dialog. So this case, gif image was not animated in all IE versions.

2. So I write one condition in javascript, If browser is IE then I appended IMG element in div.
JavaScript
if ($.browser.msie) {
                $("#divLoading div").html("");
                $("#divLoading div").append("<img src=\"/images/9L_Loading.gif\" />");
            }


3. Now after that, in firefox, whenever I click on link, gif image is not animated from first position. I mean, suppose, I click once, then gif image is animated from beginning, and when I click on other link then gif start animation for current position. in short image is being animated in invisible position.

4. So I remove the above condition for IE, means In every browser, I appended gif image in div.
So in this case, whenever form is posted back. gif is not animated in firefox, it is working when we redirect to other form by simple navigation link.

5. then I write following code but no lucked.

JavaScript
if ($.browser.msie) {
                $("#divLoading div").html("");
                $("#divLoading div").append("<img src=\"/images/9L_Loading.gif\" />");
            } else {
                $("#divLoading div img").attr("src", "/images/9L_Loading.gif");
            }


Can anybody help me to resolve this gif image problem in browsers?

Thanks
Imrankhan
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900