Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/05/2006, 11:37
sanref
 
Fecha de Ingreso: mayo-2004
Mensajes: 189
Antigüedad: 20 años
Puntos: 1
Desacuerdo AJAX no funciona en FireFox (si en Explorer)

Hola, tengo un aplicacione donde los usuarios se loguean y la validacion la hago mediante AJAX. La aplicacion funciona muy bien en Opera, Explorer, Nescape pero no en FireFox.
Les dejo aqui el codigo para ver si alguien tiene idea de que puede ser, ya busque todo acerca de AJAX con Firefox y no encuentro donde puede estar el error

Código:
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 cargarContenido(id){
	if(id!=0){
		var t1, t2, res, funcion, valor;
		ajax = nuevoAjax();
		ajax.open("POST", "verificar_usuario.asp",false);
		//hasta aqui llega en Firefox, despues no sigue mas
		ajax.onreadystatechange=function() {
			if (ajax.readyState==4) {
				res  = ajax.responseXML.documentElement;
				funcion = res.getElementsByTagName('funcion')[0].firstChild.data;
				valor = res.getElementsByTagName('valor')[0].firstChild.data;
				eval(funcion + '(valor)');
			}
		}
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		ajax.send("usuario=" + document.form1.usuario.value + "&pass=" + document.form1.pass.value + "&campus=" + document.form1.campus.value);
	}
}
window.onload= function(){cargarContenido(0)}
Agradecere cualquier opinion

Gracias!!!!

san