Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/08/2015, 10:13
Avatar de David_Carrera_G
David_Carrera_G
 
Fecha de Ingreso: noviembre-2014
Ubicación: Santiago
Mensajes: 37
Antigüedad: 9 años, 5 meses
Puntos: 1
Exclamación Problemas en recarga de tabla

Hola estimados, me dirigo a ustedes, ya que tengo un gran problema, el cual no he podido resolver, resulta que he comenzado en un nuevo trabajo y me toco editar un código hecho por los años 2001 - 2002. La idea principal era modificar una tabla para que esta no ocupara todo el alto de una pagina, lo cual logre. Pero no de manera optima. Les dejo algunos datos para que me puedan entender mejor.

Tabla que ocupa gran parte de la página:


Tabla que arme yo:


Problema que sucede al implementar AJAX.


Código AJAX que me arma el error:
Código Javascript:
Ver original
  1. $(document).ready(function(){
  2.     verlistado()
  3.     //CARGAMOS EL ARCHIVO QUE NOS LISTA LOS REGISTROS, CUANDO EL DOCUMENTO ESTA LISTO
  4.  
  5.  
  6. });
  7. function verlistado()
  8.                         { //FUNCION PARA MOSTRAR EL LISTADO EN EL INDEX POR JQUERY
  9.                     var randomnumber=Math.random()*11;
  10.                     $.post("RecepcionReembolso.php",{
  11.                     randomnumber:randomnumber},function(data){
  12.                         $("#contenido").html(data);
  13.                     });
  14.                    
  15.                     /*var randomnumber=Math.random()*11;
  16.                     $.ajax({
  17.                         url: "RecepcionReembolso.php",
  18.                         success: function(data){
  19.                             $("#contenido").php(data);
  20.                         }
  21.                     });*/
  22.             };

Agrego HTML con el cual creo mi tabla:
Código HTML:
Ver original
  1. <table cellpadding="0" cellspacing="0" border="0" class="display" id="tabla_lista_paises">     
  2.  
  3.                 <thead>
  4.                     <tr>
  5.                         <th>rut</th><!--Estado-->
  6.                         <th>nombre</th>
  7.                         <th>Folio</th>
  8.                         <th>Monto Total</th>
  9.                         <th>N°Docs</th>
  10.                         <th>Tipo Prestacion</th>
  11.                         <th>Sucursal Sermecoop</th>
  12.                         <th>Fecha</th>
  13.                         <th>Ejecutivo</th>
  14.                         <th>Editar</th>
  15.                        
  16.                     </tr>
  17.                 </thead>
  18.                 <tfoot>
  19.                     <tr>
  20.                         <th></th>
  21.                         <th></th>
  22.                        
  23.                      
  24.                     </tr>
  25.                 </tfoot>
  26.                   <tbody>
  27.                     <?php
  28.  
  29.                                    
  30.                                        
  31.                   while($reg=  mysql_fetch_array($listado))
  32.                    {                   
  33.                                         $IdRecRee=$reg[RecReeNumeroReembolso];
  34.                                         $IdPasar=$reg[RecReeNumeroReembolso];
  35.                                         //var_dump($IdRecRee);
  36.                                         //var_dump($IdPasar);                          
  37.                                        
  38.                               echo "<tr style='cursor: pointer' onclick='muestra(this);'>";
  39.                                echo '<td class="tedes">'.$reg['AfiRut'].'</td>';
  40.                                echo '<td class="tedes">'.$reg['Nombre'].'</td>';
  41.                                echo '<td class="tedes">'.$reg['RecReeNumeroReembolso'].'</td>';
  42.                                echo '<td class="tedes">'.$reg['RecReeCopago'].'</td>';
  43.                                echo '<td class="tedes">'.$reg['RecReeNumDoctos'].'</td>';
  44.                                echo '<td class="tedes">'.$reg['RecReeIdTipoPrestacion'].'</td>';
  45.                                echo '<td class="tedes">'.$reg['SucSerNombre'].'</td>';
  46.                                echo '<td class="tedes">'.$reg['RecReeFecha'].'</td>';
  47.                                echo '<td class="tedes">'.$reg['nombre_user'].'</td>';
  48.                                echo "<td class='tedes'><img src='images/edit.png' width='15' height='15' border='0'onDblClick='envioDatos();'>";
  49.                                echo '</tr>';
  50.                                //
  51.                      
  52.                         }                  
  53.                     ?>
  54.                 <tbody>
  55.             </table>

Como se ve en las imágenes la tabla que genere no esta como debería, algunos estilos no se aplicaron, y lo peor es que no tengo idea de porque esta de esa forma. Si alguien me pudiera dar algún tipo de guía para resolver este problema, se lo agradecería mucho.
__________________
David Carrera González
Santiago de Chile
Analista de base de datos

Última edición por David_Carrera_G; 21/08/2015 a las 10:18 Razón: Agregar más evidencia