Ver Mensaje Individual
  #5 (permalink)  
Antiguo 09/05/2006, 08:34
hgb
 
Fecha de Ingreso: noviembre-2002
Mensajes: 31
Antigüedad: 21 años, 5 meses
Puntos: 0
jeje, habia puesto mi respuesta en otro post que abri, creo que ya me estaba durmiendo :P... bueno aqui la copiada y pegada... [hr]

Bueno, ya quedo... estaba pasando el rato haber si alguién contestaba, pero mejor le heche un ojo y pues ya quedo... asi esta ahora la función ;)....


Código:
function LinkEsMenuItem(temp){
	if(temp && temp["tagName"]){
		if(temp.tagName.toLowerCase() == "a"){
			if( temp.childNodes.length == 1 && temp.parentNode.childNodes.length == 2 && IE){
				return true;
			}
			else if( temp.childNodes.length == 1 && temp.parentNode.childNodes.length == 1){
				return true;
			}else{
				document.write("[" + temp.tagName + "," + temp.childNodes.length + ", " + temp.parentNode.childNodes.length + ", " + temp.innerHTML + "] No es menu item");
				return false;
			}
		}
	}
}
Por alguna razón el IE toma un "legth" de 2 en vez de 1 como en el FF.


Esa es la solución correcta¿?¿?...