Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   HTML (http://www.forosdelweb.com/f4/)
-   -   Ayuda + radiobutton y campo texto (http://www.forosdelweb.com/f4/ayuda-radiobutton-campo-texto-580735/)

ACX_POISON 28/04/2008 08:52

Ayuda + radiobutton y campo texto
 
Gracias X leerlo amigos :

Mi pregunta es la sgte:

tengo el siguiente codigo:

letra.php

Cita:

<html>
</head>

<body>
<div id="Layer1">
<form method="post" name="frmX" id="frmX">
<table width="413" height="114" border="0">
<tr>
<td colspan="2"><div align="center">Seleccione lo que Desea </div></td>
</tr>
<tr>
<td width="146"><label>
<input name="radiobutton" type="radio" value="individual" checked="checked" onselect="document.frmX.cant_letra.disabled=!docum ent.frmX.cant_letra.disabled"/>
Individualmente</label></td>
<td width="257"><label>Cantidad de Letras
<input name="cant_letra" type="text" id="cant_letra" size="5" disabled="disabled" />
</label></td>
</tr>
<tr>
<td><label>
<input name="radiobutton" type="radio" value="intervalor" />
Por Intervalos </label></td>
<td>Entre
<label>
<input name="ini_letra" type="text" id="ini_letra" size="10" disabled="disabled"/>
y
<input name="fin_letra" type="text" id="fin_letra" size="10" disabled="disabled"/>
</label></td>
</tr>
</table>
</form>
</div>
</body>
</html>
en el hay un formulario con redio buton y campo de text que estan deshabilidados
, pero quiero que se habiliten cuando el radiobutton del lado este seleccionado
¿Como lo hago ?

GRACIAS...:si:

hgp147 28/04/2008 14:01

Re: Ayuda + radiobutton y campo texto
 
Código HTML:

<div id="Layer1">
<form method="post" name="frmX" id="frmX">
<table border="0" height="114" width="413">
<tbody><tr>
<td colspan="2"><div align="center">Seleccione lo que Desea </div></td>
</tr>
<tr>
<td width="146">
<label>
<input name="radiobutton" id="1" value="individual" checked="checked" onclick="document.frmX.ini_letra.disabled=true;document.frmX.fin_letra.disabled=true;document.frmX.cant_letra.disabled=false;" type="radio">
Individualmente
</label></td>
<td width="257">
<label>Cantidad de Letras
<input name="cant_letra" id="cant_letra" size="5" type="text">
</label></td>
</tr>
<tr>
<td>
<label>
<input name="radiobutton" id="2" value="intervalor" onclick="document.frmX.ini_letra.disabled=false;document.frmX.fin_letra.disabled=false;document.frmX.cant_letra.disabled=true;" type="radio">
Por Intervalos </label></td>
<td>Entre
<label>
<input name="ini_letra" id="ini_letra" size="10" type="text" disabled="disabled">
y
<input name="fin_letra" id="fin_letra" size="10" type="text" disabled="disabled">
</label>
</td>
</tr>
</tbody></table>
</form>
</div>


ACX_POISON 29/04/2008 12:20

Re: Ayuda + radiobutton y campo texto
 
Gracias X responder


La zona horaria es GMT -6. Ahora son las 01:17.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.