Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/08/2014, 14:55
rpa
 
Fecha de Ingreso: agosto-2014
Mensajes: 6
Antigüedad: 9 años, 8 meses
Puntos: 0
Problema con disabled = false;

Hola a todos, me he quebrado la cabez tratando de hacer que un botón habilite un campo de texto que está deshabilitado, pero no lo he podido lograr... Alguien me podrá ayudar? Aquí va el código... Muchísima

html>

<head>

<title> Inicio </title>

<script>

function nuevo_codigo_nombre() {

man_codigo_nombre.txtCodigo.disabled=false;
man_codigo_nombre.txtNombre.disabled=false;
document.getElementById('txtCodigo').value = "";
document.getElementById('txtNombre').value = "";

}

</script>

</head>

<body>

<form name = "man_codigo_nombre" id = "man_codigo_nombre">

<table align = "center" width = 200 border = 0 cellpadding = 0>

<tr>

<td align = "left" width = 50> <font face = "Tahoma" > C&oacute;odigo: </font> </td>
<td colspan = 4 width = 50> <input type = "text" name = "txtCodigo" id = "txtCodigo" size = 28 maxlength = 20 tabindex = 1 disabled> </td>

</tr>

<tr>

<td align = "left" width = 50> <font face = "Tahoma"> Nombre: </font> </td>
<td colspan = 4 width = 50> <input type = "text" name = "txtNombre" id = "txtNombre" size = 28 maxlength = 20 tabindex = 2 disabled> </td>

</tr>

<tr>

<td> &nbsp </td>
<td width = 50 align = "center"> <input type = "button" value = "Nuevo" onClick = "nuevo_codigo_nombre();"> </td>

</tr>

</table>

</form>

</body>

</html>