Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/01/2015, 07:49
preto960
 
Fecha de Ingreso: octubre-2013
Mensajes: 24
Antigüedad: 10 años, 6 meses
Puntos: 0
seleccion de radio button

buenas, estoy haciendo un proyecto en el cual me trae una serie de registros y me los muestra en una tabla en el cual tengo que mostrar en uno de los campos de la tabla la fecha actual en que estamos al seleccionar el radio button correspondiente a la fila, pero que sucede: cuando selecciono cualquier radio button en vez de colocarse la fecha actual en el campo correspondiente de la fila seleccionada, no lo hace se coloca solo en la primera fila, se que debo chequear en q fila estoy y asignarle un id al campo donde quiero mostrar la fecha pero no se como hacerlo, seria de mucha molestia que me ayuden? aca esta mi codigo.

Código PHP:
<script language="javascript">
var 
= new Date();

function 
fAgrega(value)
{


document.getElementById("fp").innerHTML f.getDate() + "/" f.getMonth() + "/" f.getFullYear();
alert(value);

}
</script> 
Código PHP:
<div style="padding-left: 10px;"
         <
label class="colorG"></label
         <
fieldset class="campofieldsetM">
                <
legend>Administrador de Publicación de Cargos</legend>    
        <
form action="" method="post" enctype="multipart/form-data" target="_self" id="theForm" name="theForm">
        
        <
label >Lista de Vacantes</label>
        <
table width="1008"  cellpadding="0" border="1" bordercolordark="#CCCCCC" cellspacing="0" style="text-align:center">
            <
thead bgcolor="#999999">
                <
tr>
                <
th width="54">ITEM</th>
                <
th width="285">Gerencia</th>
                <
th width="227">Vacante</th>
                <
th width="81">Status</th>
                <
th width="159">Fecha de Publicación</th>
                <
th width="124">Fecha de Cierre</th>
                <
th width="76">Gestionar</th>
                </
tr>
            </
thead>
                        <
tbody>
                   <
tr>
                <
td width="54"><span title="ITEM"><label name="item" id="item" value="1">1</label></span></td>
                <
td width="285"><span title="Gerencia" style="font-size:13px">GERENCIA DE ADMINISTRACIÓN</span></td>
                <
td width="227"><span title="Cargo" style="font-size:13px">ANALISTA DE FACTURACIÓN</span></td>
                <
td width="81"><span title="Status"><label name="status" id="status" value="0"></label></span></td>
                <
td width="159"><span title="fp" id="fp"></span></td>
                <
td width="124"><span title="fc" id="fc"></span></td>
                <
td width="76" align="center"><span title="Gestionar"><input  name="gestionar" id="gestionar" type="radio" value="1" onChange="fAgrega(this.value);" onClick="nv.disabled = false; pv.disabled = false"/></span></td>
                </
tr>
            </
tbody>
                    <
tbody>
                   <
tr>
                <
td width="54"><span title="ITEM"><label name="item" id="item" value="2">2</label></span></td>
                <
td width="285"><span title="Gerencia" style="font-size:13px">GERENCIA DE ADMINISTRACIÓN</span></td>
                <
td width="227"><span title="Cargo" style="font-size:13px">EJECUTIVA DE APS</span></td>
                <
td width="81"><span title="Status"><label name="status" id="status" value="0"></label></span></td>
                <
td width="159"><span title="fp" id="fp"></span></td>
                <
td width="124"><span title="fc" id="fc"></span></td>
                <
td width="76" align="center"><span title="Gestionar"><input  name="gestionar" id="gestionar" type="radio" value="2" onChange="fAgrega(this.value);" onClick="nv.disabled = false; pv.disabled = false"/></span></td>
                </
tr>
            </
tbody>
                </
table><br>

        
</
form>


</
fieldset>

</
div
el que me pueda ayudar muchas gracias de antemano! :/