perchè stai usando male ajax infatti
function ajaxFunction(){
var ajaxRequest;
try{
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
alert("Ajax non supportato");
return false;
}
}
}
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
RiempiMenu(ajaxRequest.responseText);
}
}
ajaxRequest.open("GET", "mettiLaUrlqui.php", true);/*<...... metti la url!!*/
ajaxRequest.send(null);
}
function RiempiMenu(risposta){alert(risposta)}
in caricaProvince anzichè
xmlHTTP = getXMLHttpRequest();
xmlHTTP.onreadystatechange=RiempiMenu(risposta);
xmlHTTP.open("GET",url,true);
xmlHTTP.send(null);
metti solo:
ajaxFunction();
prova un po' sta cosa via