Attento che hai dichiarato la variabile identificaDiv dentro la funzione RichiestaPrenoAJAX, anzi, peggio, in un contesto di livello ancora più (un if()), quindi detta variabile, come chiudi la parentesi graffa del blocco if, ... scompare dalla faccia della terra!
quindi ...
dichiara le variabili che vuoi utilizzare in più funzioni all'esterno di esse, come hai fatto con var XMLHTTP.
da cui:
codice:
var XMLHTTP;
var identificaDiv;
function RichiestaPrenoAJAX(stringa,stringa1,stringa2,stringa3,stringa4,stringa5)
{
if (stringa.length > 0) {
identificaDiv = "prenoStatus" + stringa5;
var url = "anagraficheProduzioneAjax.asp?id_master_correlato=" + stringa + "&memotype=" + stringa1 + "&nome=" + stringa2 + "&dal=" + stringa3 + "&al=" + stringa4 + "&idM=" + stringa + "&aziendaM=" + stringa2;
XMLHTTP = QualeBrowser(GestioneStato);
XMLHTTP.open("GET", url, true);
XMLHTTP.send(null);
}
else {
document.getElementById(identificaDIV).innerHTML = "";
}
}
function GestioneStato()
{
if (XMLHTTP.readyState == 4) {
var R = document.getElementById(identificaDIV);
R.innerHTML = XMLHTTP.responseText;
}
}
// eccetera ...
HTH
Zappa