tengo un js como este
Código:
  
Hasta ahi por lo que he conseguido leer tendria que funcionar pero ni muchos menos. IE8 si me da respuesta pero firefox me muestra un alert vacio.function nuevoAjax(){
    var  xmlhttp = null;
	
    try{
        xmlhttp = new ActiveXObject("Msxml12.XMLHTTP");
    } catch (e) {
        try{
            xmlhttp = ActiveXObject("Microsoft.XMLHTTP");
        } catch (e){
            xmlhttp = false;
        }
    }
	
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}
function upAjaxGet(url){
    ajax = nuevoAjax();
    ajax.open("GET", url);
    ajax.onreadystatechange = function(){
          if (ajax.readyState == 4){
		data  = ajax.responseText;
		alert(data);
    };
    ajax.send();	
	}
}
function cargaLista(){
    req = null;
    req = upAjaxGet("valida.php");
}
este el codigo php
Código:
  
Alguien sabe por que?? <?php 
$salida = array();
$conn = mysql_connect('localhost','nombre','pass');
mysql_query("SET NAMES 'utf8'");
if (mysql_select_db('qes993',$conn)) {
    $sql = "SELECT * FROM usuarios";
    $result = mysql_query($sql,$conn);
    if (mysql_num_rows($result) > 0) {
        $flg_tabla_dsc_inicial_r = true;
        while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
            $salida[$row['idusuario']]= $row['usuario'];
        }
    }
}
print_r(json_encode($salida));
?>
 
 
Este tema le ha gustado a 1 personas