2 Replies Latest reply on Apr 15, 2014 1:21 AM by TomButler

    How to use AJAX method???

    Rookie

      when I test my web page in internet explorer pocket it work well, but when i test it in terminal emulation it seems that cache memory or something like that fill out because the terminal emulation slows and then i need to restart my device.

       

      This is my actual AJAX CODE

       

      function xmlHttpPostGrabar(QueConsulta,Consulta){/

       

           var xmlHttpReq = false;

           var self = this;

       

           if(window.XMLHttpRequest){

                self.xmlHttpReq = new XMLHttpRequest();

           }

           else if(window.ActiveXObject){

                self.xmlHttpReq = new ActiveXObject('Microsoft.XMLHTTP');

           }

           self.xmlHttpReq.open('POST','xxxxx.php',false);

           self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');

           self.xmlHttpReq.onreadystatechange =

           function(){

                alert(self.xmlHttpReq.status+" - "+self.xmlHttpReq.readyState+" - "+self.xmlHttpReq.statusText);    

                return false;

           }

           self.xmlHttpReq.send(LlamaParametrosGrabar(Consulta));

      }