Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/02/2012, 19:03
miguelcalla
(Desactivado)
 
Fecha de Ingreso: octubre-2011
Mensajes: 164
Antigüedad: 13 años, 3 meses
Puntos: 1
Respuesta: tipo de dato fecha(date)

este es el html el js esta lineas mas arriba.. este codigo funciona bien es decir al seleccionar algun item del combo (nombre_corto) muestra en los text (txtinicio[int],txtvalor[int]) los datos relacionados al idcurso ,
ahora quiero agregar un txt para que al seleccionar el item ademas de mostrar id_curso y cupos tambien muestre la fecha en otro text
Código PHP:
Ver original
  1. <tr>
  2.       <td style="color:#b2030b" width="50%" align="right" nowrap="nowrap">Curso <span class="campo_obligatorio">*</span></td>
  3.       <td nowrap="nowrap">
  4.         <select name="cursos" id="cursos" style="width:180px" onChange="javascript:cargaPrecio(this.value);">
  5.           <option value="-1" selected="selected">- Seleccione - </option>
  6.            <?php
  7.            $sql_producto = "SELECT id_curso,nombre_corto,cupos FROM curso ORDER BY nombre_corto";
  8.            $sql_result_producto = mysql_query($sql_producto, $link);
  9.             while($row_prod = mysql_fetch_array($sql_result_producto)){?>
  10.              <option value="<?php echo str_pad($row_prod['id_curso'],11,'0',STR_PAD_LEFT).$row_prod['cupos'];?>"><?php echo $row_prod['nombre_corto'];?></option>
  11.             <?php }?>
  12.         </select>
  13.       </td>
  14.     </tr>
  15.     <tr>
  16.         <td width="50%" align="right" nowrap="nowrap">Fecha Curso </td>
  17.         <td>
  18.         <input name='txtinicio' type='text' id='txtinicio' value='' size="15">
  19.         </td>
  20.     </tr>
  21.     <tr>
  22.         <td width="50%" align="right" nowrap="nowrap">Valor </td>
  23.         <td>
  24.         <input name='txtvalor' type='text' id='txtvalor' value='' size="15">
  25.         </td>
  26.     </tr>