title: Jquery ajax response text not complete
body: <p>I have a page in which I have to reload latitudes and longitudes to refresh a Google map. I do this using ajax, the JS function is this:</p>
  
  <pre><code>function refreshMap(idCamiones)
  {
  
  $.ajax({
      type: "GET",
      async: false,
      url: "refresh.php",
      data: "idCamiones="+idCamiones,
      contentType: "application/x-www-form-urlencoded",
      success : function(text)
          {
               refresh = text;
           }
  });
  
  //Borramos todos los marcadores actuales
  for (i in markersArray) {markersArray[i].setMap(null);}
  markersArray.length=0;
  
  //generamos un array con las latitudes en pares y las longitudes en nones.
  posArray=refresh.split(",");
  for(i=0;i&lt;=posArray.length;i=i+2)
  {
  addMarker(2,posArray[i],posArray[i+1]);
  }
  }
  </code></pre>
  
  <p><code>refresh</code> is a global JS variable which stores the response from the PHP file. If I call the PHP file using the browser the data is complete, I'm supossed to get <code>(posArrray[0],..,posArray[n])</code> but if I call the PHP using the JS function the JS variable only saves <code>(posArray[n-1],posArray[n])</code> and all the other coordinates are missing just in the JS variable my PHP script works well.  </p>
  
  <pre><code>&lt;?php
  include_once("conexion.php");
  $idCamiones=$_GET['idCamiones'];
  $reponse='';
  $query="SELECT * from datos INNER JOIN dbo.eventos ON eventos.codigo=datos.codigo where id IN (
  Select max(id) from datos where camion in (".$idCamiones.") group by serie)  order by serie";
  $bD=new COM("ADODB.Recordset");
  $bD-&gt;Open($query,$conn);
  $busData=fetch_assoc($bD);
  $bD-&gt;close();
  for($i=0;$i&lt;sizeof($busData);$i++)
  {
  $response.=$busData[$i]['latitud'].",".$busData[$i]['longitud'].",";
  }
      echo $response;
  </code></pre>
  
  <p>?></p>
  
  <p>I dont know if I'm returning the $response in the php file incorrectly, I also tried with <code>refresh=$.ajax({}).responseText;</code> and I get the same results.</p>