2 Replies Latest reply on Feb 18, 2015 3:28 AM by ManHasEdge

    $.ajax

    ManHasEdge

      $.ajax({

        url:"quizDB.txt",

        type : 'GET',

        success:function(data){

       

       

        var quizsDB = data.split("。");

       

       

       

        for (var i=0;i<quizsDB.length-1;i++){

        sym.$("text1").append("<br><br>"+quizsDB[i]+"。");

        sym.getComposition().getStage().setVariable("val"+[i],quizsDB[0]);

        }

       

       

        } //success:function(data)

      }); //$.ajax

       

       

      var val = sym.getComposition().getStage().getVariable("val"+[0]);

      sym.$("text2").html(val);