6 Replies Latest reply on Nov 28, 2014 1:05 AM by severin.ch

    Loading external data using ajax

    severin.ch

      Hello

       

      I try to load external data using $.ajax...

       

      After some failures I wrote a simple HTML-file containing this script:

      //----------------------------------------------------------------------------

      <script type="text/javascript">

        $(document).ready(function(){

         $("button").click(function(){

        $.ajax({url:"./quiz.json",async:false,success:function(result){

         alert(result);

        }});

         });

        });

      </script>

      //----------------------------------------------------------------------------

       

      This works as expected. So I tried to include this code into edge like this:

      //----------------------------------------------------------------------------

      Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {  

          // Comp loaded

          // ....some other code......

         function loadAJAX(){

            $.ajax({url:"./quiz.json",async:false,success:function(result){

            alert((result));

         }});

         }

          // ....some more code......

      //----------------------------------------------------------------------------


      When I call the function 'loadAJAX();' I get 'Javascript error in event handler! Event Type = element'...


      I tried several other things - but nothing worked. Any help would be greatly appreciated.