2 Replies Latest reply on May 20, 2013 2:54 PM by LeandroAmano

    load html made by edge into other html made by edge

    LeandroAmano

      Hi guys,

      I have a menu with contains some buttons, every button calls a html file generated by edge. But it works only one time. The second click event not works. Any suggestions?

       

      Thanks in advance!

       

      The code on click event:

       

      this.links = ["home.html", "gallery.html", "contact.html"];

       

      sym.$("btn" + i).bind("click", {

                          htmlFile : this.links[i]

                }, function(e) {

                          if(e.target == sym.selectedItem){

                                    return;

                          }

                          sym.$(sym.selectedItem).animate({opacity:1}, 300, "linear");

                          sym.$(e.target).animate({opacity:0.4}, 600, "linear");

                          sym.selectedItem = e.target;

                          sym.$("#target").load(e.data.htmlFile);

                          e.preventDefault();

                });

        • 1. Re: load html made by edge into other html made by edge
          Zaxist Level 4

          you can use iframe

           

          make a symbol called LoadFrame then copy paste these codes in compositionReady

           

           

          sym.$("LoadFrame").append('<iframe id="LoadFrame"src="your edge folder address/index.html" frameborder="0" scrolling="no"></iframe>');

          sym.$("#LoadFrame").css({"height":"100%","width":"100%"});

           

           

          if you wanted to remove use this code:

           

          sym.$("#LoadFrame").detach();

           

          Zaxist

          • 2. Re: load html made by edge into other html made by edge
            LeandroAmano Level 1

            I found this:

             

            yepnope({

                      load: [

                                "libs/EdgeCommons.js"

                      ],

                      complete: function(){

                                // Center Stage

                                EC.centerStage(sym);

             

             

                                sym.$("btn").click(function() {

                                          EC.loadComposition( "SpritesheetAnimation.html", sym.getSymbol("content") );

                                });

                                EC.loadComposition( "SpritesheetAnimation.html", sym.getSymbol("content") );

                      }

            });

             

            Tks Zaxist.