Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/09/2009, 03:37
Banshi
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Mostrar Lista menú ocultas

Cita:
Iniciado por abimaelrc Ver Mensaje
Eso ya es con javascript y css. Debes saber usar el HTML DOM. Sería algo así

Código html:
Ver original
  1. <script language="javascript">
  2. function call(){
  3.     if(document.formulario.r[0].checked){
  4.         document.getElementById("div1").style.visibility = "visible";
  5.     }
  6.     else if(document.formulario.r[1].checked){
  7.         document.getElementById("div2").style.visibility = "visible";
  8.     }
  9. }
  10. <form name="formulario">
  11. <input type="radio" name="r" onclick="call()" />
  12. <div id="div1" style="visibility: hidden;">algo 1</div>
  13. <input type="radio" name="r" onclick="call()" />
  14. <div id="div2" style="visibility: hidden;">algo 2</div>
  15. </form>
Esta opción ya la había visto googleando y no me iba, pero después de leerlo tanto he repasado todo el código de arriba a abajo y tenía un error de javascript en otra zona que hacía que no fuera. Muuuuuuuuuchas gracias.

Saludos.