Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/09/2010, 09:13
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 10 meses
Puntos: 310
Respuesta: habilitar un input file deshabilitando un text

Perdón esque no me di cuenta, me falto declarar la función ID:
Código Javascript:
Ver original
  1. function ID(id){return document.getElementById(id);}
  2. //añade esto al script y en teoría debería funcionarte
Saludos (:
Edit: Lo probé local y funciona bien, pero lo puse al revés, cambia el código HTML:
Código HTML:
Ver original
  1. <input type='text' id='txt' />
  2. <input type='file' id='arch' disabled='disabled' />
  3. <input type='checkbox' onclick="ID('txt').disabled=this.checked;ID('arch').disabled=!this.checked;" />
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red

Última edición por _cronos2; 29/09/2010 a las 09:19