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<tr>
<td style="color:#b2030b" width="50%" align="right" nowrap="nowrap">Curso <span class="campo_obligatorio">*</span></td>
<td nowrap="nowrap">
<select name="cursos" id="cursos" style="width:180px" onChange="javascript:cargaPrecio(this.value);">
<option value="-1" selected="selected">- Seleccione - </option>
<?php
$sql_producto = "SELECT id_curso,nombre_corto,cupos FROM curso ORDER BY nombre_corto";
$sql_result_producto = mysql_query($sql_producto, $link); <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>
<?php }?>
</select>
</td>
</tr>
<tr>
<td width="50%" align="right" nowrap="nowrap">Fecha Curso </td>
<td>
<input name='txtinicio' type='text' id='txtinicio' value='' size="15">
</td>
</tr>
<tr>
<td width="50%" align="right" nowrap="nowrap">Valor </td>
<td>
<input name='txtvalor' type='text' id='txtvalor' value='' size="15">
</td>
</tr>