Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Error: lenght required

Estas en el tema de Error: lenght required en el foro de Frameworks JS en Foros del Web. Código: function toggle(what) { var aobj = document.getElementById(what); if( aobj.style.display == 'none' ) { aobj.style.display = ''; } else { aobj.style.display = 'none'; } } ...
  #1 (permalink)  
Antiguo 25/02/2009, 06:56
Avatar de farra  
Fecha de Ingreso: marzo-2008
Ubicación: Aqui estoy
Mensajes: 574
Antigüedad: 16 años, 1 mes
Puntos: 20
Pregunta Error: lenght required

Código:
function toggle(what) {
        var aobj = document.getElementById(what);
        if( aobj.style.display == 'none' ) {
               aobj.style.display = '';
        } else {
               aobj.style.display = 'none';
        }
}
function CrearXMLHttp(){
	XMLHTTP=false;
	if(window.XMLHttpRequest){
		return new XMLHttpRequest();
	}else if(window.ActiveXObject){
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
}
// suponiendo que tu div se llama loading
function OpenPage(url,id,loading){
//alert(url+' '+id);
	req=CrearXMLHttp();
	if(req){
		req.onreadystatechange = function() { manejador(id,loading); }; // aca cambie
		req.open("POST",url,true);
		req.send(null);
                toggle(loading); // ojo aqui
	}
}
function manejador(id,loading){
	if(req.readyState == 4){
		if(req.status == 200){
                        toggle(loading); // ojo aca
			document.getElementById(id).innerHTML=req.responseText;
		}else{
			alert("Error"+req.statusText)
		}
	}
}
llamada:
Código:
OpenPage('pagina.php','contenedor','cargando');


tengo un problema con esta funcion de ajax....

cuando abro en explorer, opera, safari, y chrome funciona perfecto, pero al utilizar con mozilla firefox no me funciona...

me tira un alert que dice "Errorlenght required"

a que puede deberse esto?
__________________
Firma:
Es mas dificil para el mono entender que el hombre desciende de el....

PD: Siempre doy karma al que me da una buena respuesta... ;0)
  #2 (permalink)  
Antiguo 25/02/2009, 12:19
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Error: lenght required

Cerrado, continua en:

http://www.forosdelweb.com/f77/probl...n-ajax-673813/
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Tema Cerrado




La zona horaria es GMT -6. Ahora son las 14:43.