Foros del Web » Programando para Internet » Javascript »

Error con alert

Estas en el tema de Error con alert en el foro de Javascript en Foros del Web. Cada vez que uso un alert, mozilla me salta con esto! [Exception... "'Permiso denegado para establecer la propiedad XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e ...
  #1 (permalink)  
Antiguo 17/10/2006, 02:03
 
Fecha de Ingreso: diciembre-2004
Mensajes: 278
Antigüedad: 19 años, 5 meses
Puntos: 0
Error con alert

Cada vez que uso un alert, mozilla me salta con esto!

[Exception... "'Permiso denegado para establecer la propiedad XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://localhost/trazabilidad/js/listado_trabajo.js :: autocompletar :: line 3" data: no]

A alguien le suena porque me dice siempre lo mismo?
El alert igualmente funciona.... Puede que tenga algo mal escrito por el principio y por eso se me acumule el error?
  #2 (permalink)  
Antiguo 17/10/2006, 04:49
Avatar de Wdeah  
Fecha de Ingreso: julio-2005
Ubicación: Argentina
Mensajes: 109
Antigüedad: 18 años, 10 meses
Puntos: 0
si posteas el codigo quizas...
  #3 (permalink)  
Antiguo 17/10/2006, 04:55
 
Fecha de Ingreso: diciembre-2004
Mensajes: 278
Antigüedad: 19 años, 5 meses
Puntos: 0
Ok, primer archivo "basic.js"

Código:
function submit_enter(e,where) {
    tecla=(document.all) ? e.keyCode : e.which;
    if (tecla==13) 
			goGo(where);
}  



//ON-MOUSE-OVER / ON-MOUSE-OUT
function activar_oculta(el_div)	//no se usa en trazabilidad
{	window['on_auto_'+el_div]=1;
	
}

function ocultar_div(el_div)	//no se usa en trazabilidad
{	window['show_auto_'+el_div]=0;
	window['on_auto_'+el_div]=0;
	tempo=setInterval('opacidad_out(\''+el_div+'\')',50);
}


/*	Detecta una navegación a través de las flechas y retorna la tecla pulsada.
		Si no es ningúna flecha, devuelve 1
		También detecta el enter
*/
function navegaTeclado(evento)
{	var teclaPresionada=(document.all) ? evento.keyCode : evento.which;
	
	switch(teclaPresionada)
	{	case 40:				
					return 40;
					break;
					
		case 38:
					return 38;
					break;
					
		case 13:
					return 13;
					break;
					
		default: return 1;		
	}
}
  #4 (permalink)  
Antiguo 17/10/2006, 04:56
 
Fecha de Ingreso: diciembre-2004
Mensajes: 278
Antigüedad: 19 años, 5 meses
Puntos: 0
Luego incluyo ajax.js

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;
}
  #5 (permalink)  
Antiguo 17/10/2006, 04:57
 
Fecha de Ingreso: diciembre-2004
Mensajes: 278
Antigüedad: 19 años, 5 meses
Puntos: 0
Luego efects.js, del cual no uso ninguna funcion

Código:
function init_opacidad_in( el_div )
{	obj = document.getElementById( 'auto_'+el_div );
	if (document.all)
    obj.style.filter = 'alpha(opacity=0)';
  else
    obj.style.MozOpacity = 0; 
	obj.style.display='block';
	tempo=setInterval('opacidad_in(\'' + el_div + '\')',50);
}

//El elemento al que apliquemos fade_in debe llamarse 'auto_'+xxxx
function opacidad_in(	el_div )
{	opa+=10;
  if (opa>=100) 
	{	clearInterval(tempo);
		opa=100;
	}
  obj = document.getElementById( 'auto_'+el_div );
  if (document.all)
    obj.style.filter = 'alpha(opacity='+opa+')';
  else
    obj.style.MozOpacity = opa/100; 
}

//El elemento al que apliquemos fade_out debe llamarse 'auto_'+xxxx
function opacidad_out( el_div )
{	opa-=10;
  obj = document.getElementById( 'auto_'+el_div );
	
	if (opa<=0) 
	{	clearInterval(tempo);
		obj.style.display='none';
		opa=0;
	}
  
  if (document.all)
    obj.style.filter = 'alpha(opacity='+opa+')';
  else
    obj.style.MozOpacity = opa/100; 
}
  #6 (permalink)  
Antiguo 17/10/2006, 04:57
 
Fecha de Ingreso: diciembre-2004
Mensajes: 278
Antigüedad: 19 años, 5 meses
Puntos: 0
Y por ultimo,
Código:
//Variables a utilizar por el script

busqueda=null	//Guardamos la cadena a buscar?
ultimoIdentificador=0;
v=1;		//Para controlar el blur/focus


//Se inicia el sistema de autocompletado
function autocompletar(loQue)
{	clearTimeout(ultimoIdentificador);
	ultimoIdentificador=setTimeout('rellenaLista(\''+loQue+'\')', 1000);
}



function rellenaLista( nombre_input )
{	var valor=document.getElementById(nombre_input).value;
	divLista=document.getElementById('auto_'+nombre_input);
	
	//Validamos el texto= alfanumerico; longitud mayor que 2 y menor de 40
	var reg=/(^[a-zA-Z0-9.@ ]{2,40}$)/;	
	if(!reg.test(valor))
	{	divLista.style.display="none";
	}
	else
	{
		//Si no hay que buscar en BD
		/*if(busqueda_bd()==0)
		{
		}*/
		busqueda=valor;
		var ajax=nuevoAjax();
		ajax.open("POST", "ajax/listados.php?",true);
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		
		if(nombre_input=="op")
			ajax.send("busqueda="+valor+"&acabado="+document.getElementById('acabado').value+"&func=getOP");
		else
			ajax.send("busqueda="+valor+"&func=getAcabado");
		
		ajax.onreadystatechange=function()
		{alert('h');
			if(ajax.readyState==4)
			{	//Si no hay resultados...
				
				if(!ajax.responseText)	
					divLista.style.display="none";				
				else
				{	var respuesta=new Array(2);
					respuesta=ajax.responseText.split("&");
					//la primera parte de lo retornado indica si deberemos buscar si continua escribiendo
					nuevaBusqueda=respuesta[0];
					if(respuesta[1]!="vacio")
					{	divLista.style.display="block";
						divLista.innerHTML=respuesta[1];
					}
				}
			}
		
		
		}
		
		
	}
}


function apply_valor( el_input, el_valor)
{	v=1;
	document.getElementById(el_input).value=el_valor;
	document.getElementById(el_input).focus();
	document.getElementById('auto_'+el_input).style.display="none";
}
Todos estos scripts son archivos externos que incluyo al html.
  #7 (permalink)  
Antiguo 17/10/2006, 05:07
Avatar de Wdeah  
Fecha de Ingreso: julio-2005
Ubicación: Argentina
Mensajes: 109
Antigüedad: 18 años, 10 meses
Puntos: 0
hola, buscando encontre que parece ser un bug del navegador. similar a https://bugzilla.mozilla.org/show_bug.cgi?id=236791

adios.
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.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:09.