Saludos estimados, vengo a pedir un poco de su sabiduria para solucionar un problema.
Para empesar tengo mi pagina modificar.php la cual tiene css con los clasicos 4 div (1-header, 2- menu, 3-area de trabajo, 4-pie)
el div 3 tiene un tipico buscador el cual al ingresar el nombre, llama a una funcion php mostrar_datos(); que esta contenida en modificar.php.
Esta funcion muestra los datos dentro de otro formulario para buscar.
El problema esta que los muestra despues del div 4, como hago para que me lo muetre en el div 3.
que he hecho para tratar de solucionarlo.
1- modifique el css, cambiandole/agregando propiedad para el area de trabajo
como z-index,display:block, entre otros.
2- copie y pegue el codigo de mostrar_datos(), dentro del div 3 y siempre el final.
3- intente con ajax para cambiar el contenido del div y nada de nada..
En Fin estare antento de sus comentarios,sermoniadas y todo lo demas.
Se los agradecere de ante mano.
P.D: Si ya busque en google y no encontre algun caso mas o menos igual y en el buscar svc tampoco, incluso andube
revisando algunos post y nada..
Estos con es el codigo..
modificar.php
body bgcolor="#4682B4">
<div id="div_main">
<div id="div_header"></div>
<div id="div_saludo"> </div>
<div id="div_menu" align="center">
<?php require_once("../../funciones/menu.php"); ?>
</div>
<div id="div_form">
<br />
<br />
<br />
<br />
<form id='frm_buscar_usuario' name='frm_buscar_usuario' action='' method='post'>
<table width='618' border='0' align='center' bordercolor='#999999' >
<tr><td height='25' colspan='6' align='center'><span class="titulo">-: MODIFICAR USUARIO :-</span></td>
</tr>
<tr><td colspan='6'> </td>
</tr>
<tr>
<td width='211' align='right'><span class="text_form">NOMBRE DEL USUARIO:</span></td>
<td width='5'> </td>
<td align='left' colspan='3'>
<input type="text" id="txt_buscar" name="txt_buscar" size="50" maxlength="50" onkeyup="searchSuggest(2);" autocomplete="off" />
<div id="search_suggest" ></div>
</td><td width="61"><input type="submit" name="btn_buscar_usu" value="Buscar" > </td>
</tr>
<tr><td colspan='6'> </td></tr>
<tr><td colspan='6' align='center'> </td>
</tr>
</table>
</form>
</div><!--- FIN DIV FORM-->
<div id="div_pre_pie"></div>
<div id="div_pie"></div>
</div>
<?php if ($_POST['btn_buscar_usu']) { mostrar_datos(); }?>
la funcion mostrar_datos()
echo "<form id='frm_modificar_usuario' name='frm_modificar_usuario' action='' method='post'>";
echo "<table width='785' border='1' align='center' bordercolor='#999999' >";
echo " <tr>";
echo " <td height='25' colspan='5' align='center'><b> MODIFICAR DATOS DEL USUARIO</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='5'> </td>";
echo "</tr>";
echo"<tr>";
echo " <td width='224' align='center'><div align='right'>NOMBRE COMPLETO:</div></td>";
echo " <td width='6'> </td>";
echo " <td align='left' colspan='3'><input name='txt_nombre_mod' id='txt_nombre_mod' type='text' size='75' maxlength='75' value='$nom' /></td>";
echo "</tr>";
echo "<tr>";
echo "<td align='center'><div align='right'>ALIAS:</div></td>";
echo "<td align='center'> </td>";
echo "<td align='left' colspan='3'><input name='txt_alias_mod' id='txt_alias_mod' type='text' size='75' maxlength='75' value='$alias'/></td>";
echo "</tr>";
echo "<tr>";
echo "<td align='right'>CONTRASEÑA</td>";
echo "<td align='center'> </td>";
echo "<td width='174' align='left'><input name='txt_pass_mod1' id='txt_pass_mod1' type='password' size='15' maxlength='50' value='$pass'/></td>";
echo "<td width='109' align='center'>CONTRASEÑA:</td>";
echo "<td width='238' align='left'><input name='txt_pass_mod2' id='txt_pass_mod2' type='password' size='15' maxlength='50' value='$pass'/></td>";
echo "</tr>";
echo "<tr>";
echo "<td align='center'><div align='right'>PERFIL</div></td>";
echo "<td align='center'> </td>";
echo "<td width='174' align='left'>";
$mysql_query2="SELECT * FROM tbl_usuarios_perfil WHERE perfil_id='".$perfil."'";
$resultado2 = mysql_query($mysql_query2,$conex);
$row2=mysql_fetch_array($resultado2);
$per=$row2['perfil_id'];
$t=$row2['perfil_tipo'];
echo " <select id='list_perfil_mod' name='list_perfil_mod'>";
echo "<option value='$per'>$t</option> ";
echo "<option value='0'>- PERFIL -</option> ";
$mysql_query3="SELECT * FROM tbl_usuarios_perfil ";
$resultado3 = mysql_query($mysql_query3,$conex);
while ($row3=mysql_fetch_array($resultado3))
{ echo'<OPTION VALUE="'.$row3['perfil_id'].'">'.$row3['perfil_tipo'].'</OPTION>';}
mysql_close($conex);
echo " </select> ";
echo "</td>";
echo "<td width='109' align='right'>ESTADO</td>";
echo "<td width='238' align='left'>";
echo "<select id='list_estado_mod' name='list_estado_mod'>";
if ($estado=="A")
{ echo "<option value='A'>ACTIVO</option>";
echo "<option value='I'>INACTIVO</option>";
}
if ($estado=="I"){ echo "<option value='I'>INACTIVO</option>";
echo "<option value='A'>ACTIVO</option>";}
echo "</select> ";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='5'> </td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='5' align='center'>";
echo "<input type='submit' name='btn_modificar_usuario' id='btn_modificar_usuario' value='MODIFICAR'>";
echo "</td>";
echo " </tr>";
echo "</table>";
echo "<input type='hidden' id='txt_id_usuario' name='txt_id_usuario' size='3' maxlength='3' value='$id'/>";
echo "</form>";
y el css
body{
margin:0;
padding:0;
background-color:#4682B4;
}
#div_main{
width:850px;
margin:0 auto;
background-color:#FFF;
}
#div_header {
margin-top: 10px;
background-color:transparent;
height:150px;
width:850px;
background-image:url(../img/header5.jpg);
background-repeat:no-repeat;
}
#div_saludo {
background-color:transparent;
height:40px;
width:850px;
background-image:url(../img/saludo2.jpg);
background-repeat:no-repeat;
}
#div_menu {
background-color:transparent;
height:65px;
width:850px;
background-image:url(../img/menu9.jpg);
background-repeat:no-repeat;
}
#div_form {
margin-top: 10px;
background-color:#FFF;
height:auto;
width:850px;
z-index:2;
display:block;
}
#div_pre_pie {
background-color:transparent;
height:70px;
width:850px;
background-image:url(../img/pre_pie.jpg);
background-repeat:no-repeat;
}
#div_pie {
background-color:transparent;
height:70px;
width:850px;
background-image:url(../img/pie5.jpg);
background-repeat:no-repeat;
}
Y esta una captura de lo que pasa