Quote Originariamente inviata da Shores Visualizza il messaggio
Prima di tutto io scriverei:
codice:
if(trim($_POST["XML"])=="get"){
.....
}
anche mettendo questa ottengo il seguente errore: Notice: Undefined index: XML in C:\.....

Della parte javascript non posso essere sicuro, non ci hai detto con che framework stai lavorando, jQuery, altro?
uso la seguente funzione js che richiamo quando creo l'oggetto ajax ( var ajax = startXMLHttpRequest())

codice:

//AJAX-----------------------------
function startXMLHttpRequest() {
 XHR = null,
 browserUtente = navigator.userAgent.toUpperCase();


 if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object")


  XHR = new XMLHttpRequest();
  
 else if(window.ActiveXObject && browserUtente.indexOf("MSIE 4") < 0) {
  if(browserUtente.indexOf("MSIE 5") < 0)


   XHR = new ActiveXObject("Msxml2.XMLHTTP");
  else
   XHR = new ActiveXObject("Microsoft.XMLHTTP");
 }
 return XHR;
}