Ver Mensaje Individual
  #9 (permalink)  
Antiguo 29/08/2008, 08:59
Rockzilla
 
Fecha de Ingreso: julio-2008
Mensajes: 129
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Urgente tengo problema con el proceso de cargar informacion de un combobox

lo cambie asi
Código PHP:
<p>
<table width="674" height="30" align="center">
<tr bgcolor="#CCCCCC" class="Estilo1">
</td>
</p>

<table width="600" align="center">
<tr> 
<td align="left" height="25" valign="top" nowrap><div align="left"><font size="2">
<script language="javascript" type="text/javascrip" src="ajaxfun.js"></script>
<?php
//Conexion con la base de datos
$link = @mysql_connect ("localhost","root","") or
die(
"Error de conexion: ".mysql_error());

@
mysql_select_db("name",$link) or
die(
"Error de selección: ".mysql_error());
?>


<table width="600" align="center">
<tr> 
<td align="left" height="25" valign="top" nowrap><div align="left"></div></td>
</tr>
<tr> 
<td align="left" valign="top" height="25"></td>
<form name="form1" method="GET" onSubmit"enviarDatos('form1', 'combito.php');" action="combito.php?tarea=<?php echo $row['id_tabla']; ?>" id="form1">
<input type="hidden" name="combo" value="document.getElementByid('combo').value" />
<?php
$result
=mysql_query("select id_tabla, tarea from actividades order by tarea"); 
while (
$row=mysql_fetch_array($result)){ 
echo 
'<select name="combo" size="1" id="combo" onChange="javascript:document.form1.submit();">';
echo 
"<option value='0'>___</option>";
}

if (
$row['id_tabla'] == $form1){
echo 
"<option value='".$row['id_tabla']."' selected>".$row['tarea']."</option>"

else{
echo 
"<option value='".$row['id_tabla']."'>".$row['tarea']."</option>" ;
}
$form1=$form1; echo "</select>";
//$id=$_REQUEST['combo'];//es el valor del combo no del formulario 
?>
</form>
<?php
$tarea 
$_GET['combo'];
$row=mysql_fetch_array(mysql_query("select * from actividades where id_tabla='".$id."'")); 
?>

<table width="513" height="73" border="1" align="center" bordercolor="#000000" bgcolor="#DFDFDF">
<td width="189"><div align="center">Sistema de Monitoreo y Evaluaci&oacute;n </div></td>
<td width="182"><div align="center">Dependencia</div></td>

<td width="120"><div align="right">
<div align="right"><?php echo $row['dependencia'?></div> 
</div></td>
</tr>
</table>



<table width="514" height="30" border="1" align="center" bordercolor="#000000">
<tr bgcolor="#DFDFDF">
<td width="191">Nombre de la Tarea </td>
<td width="311" height="24"><?php echo $row ['actividad'?></td>
</tr>
</table>
<table width="515" height="171" border="1" align="center" bordercolor="#000000">
<td width="191" bgcolor="#DFDFDF">Fecha de inicio </td>
<td width="183" height="28" bordercolor="#000000" bgcolor="#DFDFDF"><p>
<?php echo $row ['f_i'?></p></td>
<td width="119" rowspan="6" nowrap bordercolor="#000000" bgcolor="#DFDFDF">&nbsp;</td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td bgcolor="#DFDFDF">Fecha de final </td>
<td height="24" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row ['f_f'?></a></td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td bgcolor="#DFDFDF">Fecha real de culminaci&oacute;n</td>
<td height="24" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row ['f_r'?></a></td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td bgcolor="#DFDFDF">Monto de la actividad </td>
<td height="24" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row ['monto'?></td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td bgcolor="#DFDFDF">Trimestre a Ejecutar </td>
<td height="31" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row ['trimestre'?></td>
</tr>
<tr bgcolor="#CCCCCC" class="Estilo1">
<td bgcolor="#DFDFDF">Unidad de medida: </td>
<td height="24" bgcolor="#DFDFDF"><?php echo $row ['unidad'?></td>
</tr>
</table>
<p></p>
pero quedo peor ahora me salen 7 combobox pero en blanco y no me realiza mas nada