Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/02/2011, 17:05
omarMusic
 
Fecha de Ingreso: febrero-2011
Ubicación: Evolandia
Mensajes: 103
Antigüedad: 13 años, 2 meses
Puntos: 10
Respuesta: ayuda para habilitar un select por medio de un radiobutton y función de ja

Pruebalo de esta manera

Código HTML:
Ver original
  1. <script type="text/javascript">
  2. function init() {
  3.     document.getElementById("permiso").disabled = true;
  4. }
  5. function extranjero(radio){
  6.     document.getElementById("permiso").disabled=(radio.value == 2)?true: false;
  7. }
  8. </head>
  9. <body onload="init()">
  10.     <tr>
  11.         <th>Extranjero?</th>
  12.         <td>
  13.             <input type="radio" name="extranjero" value="1" onclick="extranjero(this)" />Si
  14.             <input type="radio" name="extranjero" value="2" checked onclick="extranjero(this)" />No
  15.         </td>
  16.     </tr>
  17.     <tr>
  18.         <th>Permiso</th>
  19.         <td>
  20.             <select name="permiso" id="permiso">
  21.             <option value="1">Permiso</option>
  22.             <option value="2">Residencia</option>
  23.             </select>
  24.         </td>
  25.     </tr>  
  26. </body>
  27. </html>