
Aquí os dejo el código ajax:
Código:
¿Qué puede estar fallando? function nuevoAjax(){
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function Cargar(url){
var centro_galeria = document.getElementById('centro_galeria');
ajax=nuevoAjax();
ajax.open("GET", url,true);
ajax.onreadystatechange=function(){
if(http.readyState==4){
centro_galeria.innerHTML=ajax.responseText;
}
}
ajax.send(null);
}
¿Me podéis echar una manita? Estoy un poco pez con ajax. Muchas gracias !!Edit: Después de estar horas investigando no consigo hacer que funcione, chicos, sois mi única esperanza. Por favor echadme una mano.




