salve a tutti,
mi sto avvicinando ultimamente ad Ajax e, dopo i primi passi, volevo realizzare un comunque semplice tabmenu integrando ASP.

Mi sorge però un problema a dir poco estenuante, in quanto, mettendo qualche alert qua e là, si scopre che status restituisce 500. Ho provato a ridurre lo script asp (che non posterò) ai minimi termini per vedere se cambiava qualcosa ma nisba, quindi direi che la "colpa" è solo di ajax, solo non capisco dove.

codice:
function setAjax () {
  var xh
   var sUserb = navigator.userAgent.toUpperCase();
    
    if (typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object")
      xh = new XMLHttpRequest();
      
    else if (window.activeXObject && sUserb.indexOf("MSIE 4") < 0) {
      if (sUserb.indexOf("MSIE 5") < 0)
        xh = new ActiveXObject("Msxml2.XMLHTTP");
      else
        xh = new ActiveXObject("Microsoft.XMLHTTP");
    }
  
   
    return xh;
};


  function swFile (url, ldiv) {
     var myajax = setAjax()
     myajax.open("get", url, true)

    myajax.onreadystatechange =   function() {
    alert(myajax.readyState + " " + myajax.status)    
    if (myajax.readyState==4 && myajax.status==200 )
      getFromId(ldiv).innerHTML = myajax.responseText;    //getFromId funzione esterna
  
  };
      
    
    myajax.send (null)
  }