Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/02/2005, 10:48
maurimono
 
Fecha de Ingreso: octubre-2004
Ubicación: Santiago de Chile
Mensajes: 504
Antigüedad: 19 años, 7 meses
Puntos: 0
Habilitar un text

Hola amigos, tengo un problema para los que conocen de php:
Tengo que habilitar un text al pinchar un radio button. miren este es el codigo:

$n=1;
while ($row=mysql_fetch_array($consultar))
{
$ot = "$row[0]";
$total="$row[1]";
?>
<!--Aqui desplegar os resultados-->
<tr>
<td><input name="algo" type="radio" value="acepto" checked></td>
<td><input name="algo" type="radio" value="rechazo" onClick="rechazar('<?php echo "obj".$n; ?>')"></td>
<td><?php echo $ot; ?></td>
<td><?php echo $total; ?></td>
<td><?php echo $fecha_bien; ?></td>
<td><input type="text" name="<?php echo 'obj'.$n; ?>" disabled ></td>
</tr>

<?php
$n++;


y esta la funcion js:
function rechazar(ott)
{
//getElementById: indica un dato de un objeto ej: el nombre
//foto = document.getElementById("foto");
var nombre;
with (document)
{
nombre = getElementById(ott).name;
//window.document.write(nombre);
//window.document.write(ott);
rendir_dms.nombre.disabled=false;
rendir_dms.nombre.focus();
}
}



Supongo que aqui, en js esta el problema.

Gracia
Atte
Maurimono

Última edición por maurimono; 08/02/2005 a las 12:11