3 Replies Latest reply on Feb 1, 2010 10:01 PM by babas75fr

    javascript ajax loaded in adobe air

    babas75fr

      Hello to all,

      I come on this forum because i meet a problem with AJAX and JAVASCRIPT.

      In my main script of ADOBE air, i load with "Ajax" the javascript contents but this javascript not execute not.

      All my functions are in the < head > only the calls are in the contents

      in charge of contents loaded with and the functions are called by onclick.

       

      That here is my  script for the forum, but is characteristic of my problem:

       

      <head>

      <script type="text/javascript">

      function getRequeteHttp() {

      ////the contents was supprimed for the example////

      }

       

      function sendRequete(url) {

      ////the contents was supprimed for the example////

      }

       

      function receiveReponse(requeteHttp) {

      if (requeteHttp.readyState==4) {

      (requeteHttp.status==200) {

      visibleReponse(requeteHttp.responseText);

      }

      else {

      alert("error");

      }

      }

      }

       

      function visibleReponse(rep) {

      document.getElementById("back2").innerHTML=rep;

      }

       

      function action() {

      sendRequete('tryscript.html');

      }

       

      function yiu(){

      alert('rooooooo');

      }

      </script>

      </head>

      <body style="margin:0px;padding:0px;font-family:'Trebuchet MS';background:gray;" >

      <div>

      <input type="button" value="click" onclick="action();" />

      <div id="back2">

      <!--Contents loaded with ajax-->

      <input type="button" value="click2" onclick="yiu();" />

      <!---->

      </div>

      </div>

      </body>

      </html>

       

      Thank you for your assistants and forgiveness for my English