Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/11/2011, 16:51
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: radio button que habilita otros radiobutton

Po lo que veo vos no querés recuperar el valor del radiobutton sino simplemente que al clickear uno de un grupo, se marque otro de otro grupo, asi es más simple todavia, aunque no le encuentro mucho sentido, proba esta script
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6.  
  7. <script type="text/javascript">
  8. //<![CDATA[
  9. function establecer(opcion){
  10. var seleccion = document.getElementById(opcion).checked;
  11. if(seleccion == false){
  12. document.getElementById(opcion).checked = true;
  13. }else{
  14. document.getElementById(opcion).checked = false;
  15. }
  16. }
  17. //]]>
  18. </head>
  19. <form action="#">
  20. <p>Colores</p>
  21. <p>
  22. <label><input value="rojo" name="color" type="radio" onclick="establecer('manzana');"> Rojo</label>
  23. <label><input value="verde" name="color" type="radio" onclick="establecer('sandia');"> Verde</label>
  24. </p>
  25. <p>Frutas</p>
  26. <p>
  27. <label><input value="manzana" name="fruta" id="manzana" type="radio">Manzana</label>
  28. <label><input value="2" name="fruta" id="sandia" type="radio">Sandia</label>
  29. </p>
  30. </form>
  31. </body>
  32. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.