I have developed a webapp that works very good on firefox and opera, but on IE I keep getting an error message.
I use AJAX to communicate with a PHP file that queries a MySQL database and returns the information in JSON.
obj_detalle['items'][0].id, is "null or not an object" in IE, while in firefox works perfectly.
I have tried an alert(http2.res ponseText) and it has the correct content.
does anyone know a fix to this?
many thanks.
I use AJAX to communicate with a PHP file that queries a MySQL database and returns the information in JSON.
Code:
function sendQuerystring2(url,mod,columna)
{
http2.open("GET", url, true);
if (mod == "tabla") {
http2.onreadystatechange = function (){
if (http2.readyState == 4) {
hide('cargando');
if (http2.status == 200) {
obj_detalle = eval('(' + http2.responseText + ')');
crear_tabla(columna);
}
} else {
show('cargando');
}
}
}
Code:
{"items":[{"id":"1","titulo":"Prueba"}]}
I have tried an alert(http2.res ponseText) and it has the correct content.
does anyone know a fix to this?
many thanks.
Comment