Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    animated gif not working in IE8

    Hi,
    I have following piece of code which shows animated gif and is working OK in firefox 3.6 but in InternetExplorer 8 it shows just static image. Do you know how to make it work also in IE?
    Code:
    public class SpinnerWindow extends Window {
     private SpinnerWindow() {
                          setShowCloseButton(false);
    		setShowMinimizeButton(false);
    		setIsModal(true);
    		setShowModalMask(true);
    		centerInPage();
    		setScrollbarSize(0);
    		setWidth(192);
    		setHeight(208);
    		Img image = new Img("loading.gif");		
    		VLayout vl=new VLayout();
    		vl.setMembersMargin(3);
    		vl.setLayoutMargin(3);
    		vl.setHeight100();
    		vl.setWidth100();		
    		vl.addMember(image);
    		addItem(vl);						
    }
    SC_SNAPSHOT-2011-05-19

    #2
    Something might be wrong with the media itself. Try it in a standalone .html file with nothing else in it.

    Also, make sure you're not setting the image to be a size other than it's natural size.

    Comment


      #3
      Media is ok: I tried it in standalone html: it is animated in firefox and opera, slowly but moving in IE8.
      I have also tried your advice to set it to the original size in the code, but with no success: animated in FF, static in IE.
      (Note:rotating is working in firefox also when image is streched)

      Comment


        #4
        Well, something seems to be special about your media file, you can see a spinner in the default modal prompt, exactly like your use case.

        Comment


          #5
          Now I have tried with the files from showcases and still the same problem. You are right that I can see it on the beginning of the showcase rotating so it means bug is probably somewhere in above code?
          Attached Files

          Comment


            #6
            Can you post your actual file?

            Comment


              #7
              I experienced the same problem.

              Seems like the loading for the Showcase is written by pure JavaScript, no GWT.

              We tried several approaches.
              One of them, where we made the .gif animating is with a simple Label:

              Label text = new Label();
              text.setWrap(false);
              text.setIcon("loading.gif");
              text.setIconSize(45);
              VLayout.addMember(text);

              Another approach was with Canvas, but this will not animate the gif on all browser.

              This is a very basic behavior, using a simple gif animation.

              Do you have a smart idea, how we can achieve this?

              - Thanks

              Comment


                #8
                Sorry, we don't have a "smart idea", because as we keep saying, it's working fine no matter which way we do it, and you can also see animating .gifs inside the default prompt if promptStyle is "window", so there's obviously no framework issue.

                Try it with some of the animated media included with the product eg loading.gif, this will avoid any problems with media in the wrong format.

                Comment


                  #9
                  It happens only when calling datasource.exportData .

                  I'll try it in an example project. Thanks

                  Comment


                    #10
                    I got the same problem: image is working fine, but when adding it to a modal window it shows only a static image.
                    But I think it has something to do with the jobs going on in the "background".

                    If I open the modal window and just leave it open, the animation is shown fine.
                    But if I open the modal window, and then make a datasource request, the image is being static.

                    Got any solutions to this?
                    I am trying to do a "loading, please wait" window with an animated gif, so I need to be able to show the animation while data is loading in the background.

                    Comment


                      #11
                      Media is ok, I am using the delivered "loading.gif". It definitely has to do with the loading in the background: if I leave the modal window open, the image starts animation as soon as data arrives.

                      Any ideas how to solve this?
                      Maybe put it in a new thread or something like that, so that it is independant from the data loading?
                      Or with external JS?

                      Comment


                        #12
                        Depending on how many CPUs/CPU cores you have, different browsers may or may not continue animating a .gif while the CPU is busy. There is basically no way to control this.

                        Comment


                          #13
                          Do you have some idea for workaround? Which way to build a dynamic component representing fact that server is busy to the user? Other then static text or static image?
                          With smartgwt we would like to achieve at least similar user interface like in the hoary system which is able to animate gifs while exporting. And the image is animated also on IE8 on computer with just one cpu/core.

                          Comment


                            #14
                            What hoary system is this? Is it HTML-based or some other technology (Flash/Java?)

                            Comment


                              #15
                              HTML based using struts.
                              Why do you need to know that? Will it help you to solve the bug?
                              Do you have some idea for any workaround?

                              Comment

                              Working...
                              X