Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/05/2009, 17:38
kikequintero
 
Fecha de Ingreso: mayo-2009
Mensajes: 5
Antigüedad: 15 años
Puntos: 0
Respuesta: ayuda con este codigo.

Cita:
Iniciado por David el Grande Ver Mensaje
Es porque tienes ids repetidos (ver_on y ver_off), los ids deben ser únicos en el documento.
los cambie y no me funciona ... ( no soy muy experto en el tema)

les pido un ejemplo del codigo como quedaria.

mira el cod

<table width="735" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="20" height="210">&nbsp;</td>
<td width="704" valign="top">
<script>
OCULTO="none";
VISIBLE="block";

function mostrar(blo) {
document.getElementById(blo).style.display=VISIBLE ;
document.getElementById('ver_off').style.display=V ISIBLE;
document.getElementById('ver_on').style.display=OC ULTO;
}
function ocultar(blo) {
document.getElementById(blo).style.display=OCULTO;
document.getElementById('ver_off').style.display=O CULTO;
document.getElementById('ver_on').style.display=VI SIBLE;
}
</script>
<div id="ver_on"><a href="#" onclick="mostrar('blo')">Mostrar texto</a></div>
<div id="ver_off" style="display: none"><a href="#" onclick="ocultar('blo')">Ocultar texto</a></div>
<div id="blo" style="display: none">
asdfsadfasdfsdfsdfsdfdsfdssd0
</div>

<script>
OCULTO="none";
VISIBLE="block";

function mostrar(blo) {
document.getElementById(blo).style.display=VISIBLE ;
document.getElementById('ver_off1').style.display= VISIBLE;
document.getElementById('ver_on1').style.display=O CULTO;
}

function ocultar(blo) {
document.getElementById(blo).style.display=OCULTO;
document.getElementById('ver_off1').style.display= OCULTO;
document.getElementById('ver_on1').style.display=V ISIBLE;
}
</script>
<div id="ver_on1"><a href="#" onclick="mostrar('blo2')">Mostrar texto</a></div>
<div id="ver_off1" style="display: none"><a href="#" onclick="ocultar('blo2')">Ocultar texto</a></div>
<div id="blo2" style="display: none">
dkflaksfdlkasfdlshdlañlg9
</div>

<script>
OCULTO="none";
VISIBLE="block";

function mostrar(blo) {
document.getElementById(blo).style.display=VISIBLE ;
document.getElementById('ver_off2').style.display= VISIBLE;
document.getElementById('ver_on2').style.display=O CULTO;
}

function ocultar(blo) {
document.getElementById(blo).style.display=OCULTO;
document.getElementById('ver_off2').style.display= OCULTO;
document.getElementById('ver_on2').style.display=V ISIBLE;
}
</script>
<div id="ver_on2"><a href="#" onclick="mostrar('blo3')">Mostrar texto</a></div>
<div id="ver_off2" style="display: none"><a href="#" onclick="ocultar('blo3')">Ocultar texto</a></div>
<div id="blo3" style="display: none">
524365445634563
</div>

</td>
<td width="11">&nbsp;</td>
</tr>
</table>

Última edición por kikequintero; 13/05/2009 a las 19:19