Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/09/2008, 04:40
Avatar de Legoltaz
Legoltaz
 
Fecha de Ingreso: agosto-2008
Mensajes: 325
Antigüedad: 15 años, 8 meses
Puntos: 6
Respuesta: activar input en funcion si ha chequeado "Si"

Cita:
Iniciado por JavierB Ver Mensaje
Hola estibaliz2006

Otra forma de hacerlo:

Código:
<input type="checkbox" onclick = "precio.disabled = !this.checked" />
<input type="text" name="precio" />
Saludos,
La verdad es que a mí también me parece más sencillo y útil hacerlo como has dicho.

Código PHP:
<input type="checkbox" onClick="if(this.checked){precio.disabled = false;}else{precio.disabled = true;}" />
<
input type="text" name="precio" disabled />