Salve a tutti, ho un problema col richiamare una funzione con ajax.
Ecco il codice, di seguito il richiamo alla funzione ajax:
<select name="marca" id="marca" onChange="sndReq2(this.value)" class="testo"></select>

ecco poi la funzione ajax:
var myRequest = null;
function createRequestObject() {
var ro = null;
if(window.XMLHttpRequest){
ro = new XMLHttpRequest();
}else if(window.ActiveXObject){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}
return ro;
}

var http = createRequestObject();

function handleResponse2() {
if(http.readyState == 4 && http.status == 200){
var response = new String;
response = http.responseText;
var nomi = new Array();
nomi = response.split("|");
for (i=0;i<nomi.length;i++) {
var anOption = document.createElement("OPTION");
document.getElementById("codice").options.add(anOp tion);
anOption.innerText = nomi[i];
anOption.Value = nomi[i];
}
}
}

function sndReq2(marca) {

alert("ciao="+'cerca_articolo_av_marche.php?cerca= codice&val='+marca);
http.open('GET', 'cerca_articolo_av_marche.php?cerca=codice&val='+m arca);
http.onreadystatechange = handleResponse2;
http.send(null);
}


ma a sndReq2 non viene passato alcun parametro, in quanto la alert : non mi restituisce alcun valore in corrispondenza della variabiile marca

come mai?
altro problema è che questa funzione non parte se la associo all'evento onLoad del body...come mai?