Hola.
No se como pasar estos datos con ayax:
Código:
<chart caption="Estadísticas de Limpieza por apartamentos " formatNumberScale="0" placevaluesinside= "1" rotatevalues= "0" divlinealpha= "50" plotfillalpha= "80" drawCrossLine= "1" crossLineColor= "#cc3300" crossLineAlpha= "100" theme="zune"><categories><category label="DIANA" /><category label="MAITE" /><category label="SAN FELIPE 3º" /><category label="SAN RAFAEL 1º" /><category label="VERACRUZ" /></categories><dataset seriesName="Año2015"><set value="0"/><set value="0"/><set value="0"/><set value="0"/><set value="0"/></dataset><dataset seriesName="Año2016"><set value="0"/><set value="0"/><set value="0"/><set value="0"/><set value="0"/></dataset><dataset seriesName="Año2017"><set value="0"/><set value="0"/><set value="0"/><set value="0"/><set value="0"/></dataset></chart>
Cuando la respuesta ayax es texto plano, no hay problemas, pero cuando es el anterior, no lo procesa.
Esta es la función
Código:
function Ajax(){
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 OrdenarPor(campo,desde,hasta,tiempo,dato){
//especificamos en div donde se mostrará el resultado
divListado = document.getElementById('listado');
ajax=Ajax();
//especificamos el archivo que realizará el listado
//y enviamos las dos variables: campo y orden
ajax.open("GET", "listado_anual2.php?campo="+campo+"&desde="+desde+"&hasta="+hasta+"&tiempo="+tiempo+"&dato="+dato);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
alert (divListado.innerHTML = ajax.responseText);
}
}
ajax.send(null)
}
Gracias por la ayuda