Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/04/2011, 14:05
Avatar de Manuellama
Manuellama
 
Fecha de Ingreso: noviembre-2006
Ubicación: Zafra, Extremadura, Spain, Spain
Mensajes: 174
Antigüedad: 18 años, 3 meses
Puntos: 10
Respuesta: Habilitar desabilitar campos de texto con radioboton

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Text</title>
<script language="javascript">

function habilitar(){
  if(
document.getElementById("opcion1").checked ==true){
  document.getElementById("palabra1").disabled= false;          
    }
   
}
</script>
</head>

<body>
<form id="form1" method="post" action="#">
<input type="text" value="Inhabilitado" id="palabra1" disabled="enabled" />
<input name="radio" type="radio" id="opcion1" value="opcion1" onclick="habilitar()" />
</form>
</body>
</html>


Prueba eso.