Announcement

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

    IE7 doesn't work with a very simple example

    Hi everybody,

    I'm having a very heavy problem. After hours trying to find out the
    reason, I've realized that my problem can be simplified to these few
    lines:

    - HTML file:

    <body>
    <div id='fplay'></div>
    </body>

    - GWT Main file:

    public void onModuleLoad() {

    String str = new String("<script type='text/
    javascript'>window.alert('hello');</script>");
    HTML h = new HTML(str);

    RootPanel.get("fplay").add(h);

    }

    In Firefox I get a nice "hello" in the alert, but nothing happens in
    IE7. In my project I'm using GWT 2.2 and SmartGwt 2.4, and I hope all
    my problem is this: how to add a javascript line making it working in
    IE7. Obviously, I've tried to do it in a million different ways: I've tried to add it to a Label (Label.setContents(String)), with Label.setContents(new HTML(String...))... no way.

    I know this example is very simple, in my application, I've to show a
    media player (Flowplayer) in a dynamic way, so users will be able to
    click an image, loading in this way a referenced video in the player.
    In order to get it, I need to add this script:

    <script type='text/javascript'>
    flowplayer('player', 'flowplayer-3.2.7.swf',
    {clip:autoPlay:false,autoBuffering:true}});
    </script>

    In Firefox everything's working, not in IE7. So, I think that all my
    problem can be simplified to the simple example I've commented.

    Please, I really need your help...

    Thanks in advance

    #2
    This isn't related to SmartGWT in any way, you are not using any SmartGWT widgets or classes at all. For a tip, go read the core GWT docs on JSNI. But please don't post in this forum claiming "IE7 doesn't work with a very simple example".

    Comment


      #3
      Originally posted by Isomorphic
      This isn't related to SmartGWT in any way, you are not using any SmartGWT widgets or classes at all. For a tip, go read the core GWT docs on JSNI. But please don't post in this forum claiming "IE7 doesn't work with a very simple example".
      Isomorphic, thanks for your tip, but I don't agree this is not related to SmartGWT in any way. As I previously said, those lines are just a very simplified example to make it easier for everyone who reads it, all my application is under SmartGWT, and under SmartGWT I need to add the javascript line commented in the first post. "Label.setContents" is a method just from SmartGWT, not even from GWT, and when I invoke it, although FF shows the added line, IE7 doesn't show anything.

      Actually, I wrote: "how to add a javascript line making it working in IE7. (...) I've tried to add it to a Label (Label.setContents(String)), with Label.setContents(new HTML(String...))... no way." That is SmartGWT.

      So, maybe this is not the ideal place to make my question, but, in my opinion, it's related to SmartGWT, first of all, because what a SmartGWT method makes in FF doesn't make it in IE7 and because I need the solution in SmartGWT (or GWT, but as I don't know what the solution can be, or if SmartGWT offers a different method to do it, I think it's not a crazy idea to ask it here).

      Sorry for the misunderstanding.

      Comment


        #4
        Once again, go read about JSNI, this is not related to SmartGWT in any way. Once you've read about JSNI, you will agree.

        Comment


          #5
          Originally posted by Isomorphic
          But please don't post in this forum claiming "IE7 doesn't work with a very simple example".
          How could I know it was not a SmartGWT issue?

          Now I know the reason, I agree with you. Impossible to know it before.

          P.S.: thanks

          Comment


            #6
            What we didn't like was posting a thread with a bombastic title that sounds like the whole framework is broken in IE7, rather than that you don't know how to run JavaScript in GWT.

            Really, in a similar circumstance in the future, just rely on Google - "how to run javascript code in gwt" or similar searches hit the right information.

            Comment


              #7
              Originally posted by Isomorphic
              What we didn't like was posting a thread with a bombastic title that sounds like the whole framework is broken in IE7, rather than that you don't know how to run JavaScript in GWT.

              Really, in a similar circumstance in the future, just rely on Google - "how to run javascript code in gwt" or similar searches hit the right information.
              So the title was the problem?? Hehe, just say it!! In that case... SO SORRY!!!!! Now I can understand you... In my language no one would had thought it was the Apocalipsys of the framework, but just a simple description. So, knowing that, I'd change my title: "Application working in FF, not in IE: simple example to check it out".

              I will be more careful in next questions ;)

              Comment

              Working...
              X