Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/12/2006, 08:12
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola Karmico

Entiendo que, además de divs, tienes párrafos que mostrar/ocultar. Prueba este código:
Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
mostrarIdioma(idioma) {
elementos document.body.getElementsByTagName("*");
for (
i=0ele elementos[i]; i++)
  if (
ele.lang !='')
    
ele.style.display = (elementos[i].lang == idioma) ? "block" "none";
}
</script>
</head>
<body>

<a href="javascript:mostrarIdioma('es')">Español</a> | <A href="javascript:mostrarIdioma('en')">Ingles</a><a href="javascript:mostrarIdioma('es')">Español</a><br>
<div lang="es">ESTA ES LA CAPA DE ESPAÑOL 1</div>
<div lang="es">ESTA ES LA CAPA DE ESPAÑOL 2</div>
<p lang="en">Párrafo en inglés</p>
<p lang="es">Párrafo en español</p>
<div lang="en" style="display:none;">ESTA ES LA CAPA DE INGLES 1</DIV>
<div lang="en" style="display:none;">ESTA ES LA CAPA DE INGLES 2</DIV>
<div lang="al" style="display:none;">ESTA ES LA CAPA DE ALEMAN 1</DIV>
<div lang="al" style="display:none;">ESTA ES LA CAPA DE ALEMAN 2</DIV>
</body>
</html> 
Saludos,