Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/11/2012, 11:45
misael_winne
 
Fecha de Ingreso: noviembre-2012
Ubicación: Monterrey
Mensajes: 26
Antigüedad: 11 años, 5 meses
Puntos: 0
Respuesta: clonar combobox junto con cajas de texto

<div id="medicamento">
<div class="tt">Medicamento programado</div>
<div class="nametx"><?php echo(nombre_alumno($aid)); ?></div>
<form id="myForm" method="post" name="forma" action="medicamento.php?accion=s" onSubmit="return checkform(this);" enctype="multipart/form-data">
<input type="hidden" id="num_campos" name="num_campos" value="0" />
<input type="hidden" id="cant_campos" name="cant_campos" value="0" />
<input name="aid" type="hidden" onkeypress="javascript: return utils.isString(event);" value="<?php echo $aid; ?>">
<div id="input1" style="margin-bottom: 15px;" class="clonedInput">
<table cellpadding="0" cellspacing="2" border="0">
<tr>
<td>
Nombre
</td>
<td>
Dosis
</td>
<td width="100">
Hora
</td>
<td width="100">
Hora
</td>
<td width="100">
Hora
</td>
<td width="100">
Hora
</td>
</tr>
<tr>
<td>
<input id="reporte_medicamento_medicamento_nombre" type="text" name="reporte_medicamento_medicamento1_nombre" onkeypress="javascript: return utils.isString(event);" value="" style="width: 100px;">
</td>
<td>
<input id="reporte_medicamento_medicamento_dosis" type="text" name="reporte_medicamento_medicamento1_dosis" onkeypress="javascript: return utils.isString(event);" value="" style="width: 25px;">
</td>
<td>
<select id="reporte_medicamento_medicamento_hora1_hr" name="reporte_medicamento_medicamento1_hora1_hr" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=24; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
echo $corrigecero.$i;
}
?>

</select>&nbsp;:&nbsp;
<select id="reporte_medicamento_medicamento_hora1_min" name="reporte_medicamento_medicamento1_hora1_min" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=59; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>
</td>
<td>
<select id="reporte_medicamento_medicamento_hora2_hr" name="reporte_medicamento_medicamento1_hora2_hr" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=24; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>&nbsp;:&nbsp;
<select id="reporte_medicamento_medicamento_hora2_min" name="reporte_medicamento_medicamento1_hora2_min" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=59; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>
</td>
<td>
<select id="reporte_medicamento_medicamento_hora3_hr" name="reporte_medicamento_medicamento1_hora3_hr" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=24; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>&nbsp;:&nbsp;<select id="reporte_medicamento_medicamento_hora3_min" name="reporte_medicamento_medicamento1_hora3_min" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=59; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>
</td>
<td>
<select id="reporte_medicamento_medicamento_hora4_hr" name="reporte_medicamento_medicamento1_hora4_hr" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=24; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>&nbsp;:&nbsp;<select id="reporte_medicamento_medicamento_hora4_min" name="reporte_medicamento_medicamento1_hora4_min" class="styled">
<option selected value="00">00</option>
<?php
for ($i=1; $i<=59; $i++)
{
if ($i<10) { $corrigecero='0'; } else { $corrigecero=''; }
echo '<option value="'.$corrigecero.$i.'">'.$corrigecero.$i.'</option>';
}
?>
</select>
</td>
</tr>
</table>
</div>
<div id="agregar_eliminar_btns">
<input type="button" id="btnAdd" value=" + " onclick="xajax_agregarFila(xajax.getFormValues('pr oyecto'));" />
<input type="button" id="btnDel" value=" - " />
</div>
<table>
<tr>
<td colspan="6">
Observaciones<br />
<textarea id="reporte_medicamento_medicamento1_observaciones " name="reporte_medicamento_medicamento1_observacion es" rows="2" cols="" style="width: 550px;"></textarea>
</td>
</tr>
</table>
<input name="Guardar" type="submit" id="Guardar" value="Guardar">
</form>
</div>