Foros del Web » Programando para Internet » Javascript » Frameworks JS »

No ordena tabla con formulario en header (Tablesorter)

Estas en el tema de No ordena tabla con formulario en header (Tablesorter) en el foro de Frameworks JS en Foros del Web. Hola!! Tengo un problemita. Mi tabla no se ordena y posiblemente sea porqué tengo un formulario en el header que me permite "filtrar". Pero no ...
  #1 (permalink)  
Antiguo 08/05/2012, 15:55
Avatar de luna690  
Fecha de Ingreso: marzo-2012
Ubicación: Barcelona
Mensajes: 61
Antigüedad: 12 años, 1 mes
Puntos: 3
No ordena tabla con formulario en header (Tablesorter)

Hola!!

Tengo un problemita. Mi tabla no se ordena y posiblemente sea porqué tengo un formulario en el header que me permite "filtrar".

Pero no entiendo el porqué ni que debo hacer.


Codigo :
Código HTML:
...
<script type="text/javascript">
	$(function () { 
		$('#taulaDistribuidors').jTPS( {sortList: [[0, 0]], headers: { 5: { sorter: false} }, perPages:[5, 6, 10, 20, 50, 'TOTS']} );
	});
</script>


<div id="container" class="box" align="center">

	<h4><?php echo $Distrib_titleTable; ?></h4> 

	<?php if ($total_distribuidors>0){ ?>
	<table id="taulaDistribuidors" align="center">
        <thead>
            <tr bgcolor="#324455" align="center" style="font-weight:bold; text-decoration:underline;">
            	<th></th>
                <th width="180" sort="nom"><?php echo $Generic_company; ?></th>
                <th width="100" sort="telf"><?php echo $Generic_telf; ?></th>
                <th sort="pais"><?php echo $Generic_pais; ?></th>
                <th width="180" sort="web"><?php echo $Generic_pagWeb; ?></th>
            </tr>
            <tr>
                <form name="formulari" method="get" action="">
                <input type="hidden" id="opc" name="opc" value="<?php if (!isset($_REQUEST['opc'])) echo ""; else echo "G"; ?>" />
                <th></th>
                <th><input type="text" id="txt_nom" name="txt_nom" size="15" /></th>
                <th><input type="text" id="txt_telf" name="txt_telf" size="10" /></th>
                <th><select name="cbo_pais" id="cbo_pais" ><option value="0"></option>
                    <?php while ($row = mysql_fetch_array($array_paisos)){	?>
                        <option value="<?php echo $row['id']; ?>" ><?php echo htmlentities($row['nombre']); ?></option>
                    <?php } ?>
                    </select>
                </th>
                <th><input type="text" id="txt_web" name="txt_web" size="20" /></th>
                <th>
                <input type="image" src="../img/lupa.png" value="Filtrar" title="<?php echo $searchfiltre_title; ?>" onclick="canviarFiltreDistribuidors(); return false;" />
                <input type="image" src="../img/icon_reset.png" value="Netejar filtre" title="<?php echo $clearfiltre_title; ?>" onclick="borrarFiltreDistribuidors(); return false;" />
                </th>
                </form>
            </tr>
        </thead>
       
        <tbody>
            <?php while ($rs = mysql_fetch_assoc($result1)){  ?>
            <tr>
                <td>
                    <a href="form_gestioDistribuidor.php?gestio=modificar&id=<?php echo $rs['dis_id']; ?>" class="cssID">
                    <img src="http://www.forosdelweb.com/f13/img/icon_edit.png" width="20" style="cursor:pointer" height="20" alt="" /></a>
                </td>
                <td><?php echo htmlentities($rs['dis_nom']); ?></td>
                <td><?php echo $rs['dis_telf']; ?></td>
                <td><?php $nom = get_nomPais($rs['dis_id_pais']); echo htmlentities($nom[0]); ?></td>
                <td><?php echo $rs['dis_web']; ?></td>
                <td><a onclick="confirmarEliminar('funcions.php?funcio=borrarDistribuidor&id=<?php echo $rs['dis_id']; ?>'); return false;" ><img src="http://www.forosdelweb.com/f13/img/icon_delete.png" alt="" /></a></td>
            </tr>
            <?php } ?>
        </tbody>
        
        <tfoot class="nav">
            <tr>
                <td colspan="6">
                    <div class="pagination"></div>
                    <div class="paginationTitle"><?php echo $paginationTitle; ?></div>
                    <div class="selectPerPage"></div>
                </td>
            </tr>
        </tfoot>
    </table>
<?php }else echo $Distribuidor_empty; ?> 

<?php if (!isset($_GET['opc'])){ ?>
	<?php if (isset($_SESSION['persona']) && $_SESSION['persona'] == 'A') { ?>
        <a href="form_gestioDistribuidor.php">
            <input type="button" id="dissenyBoto" value="<?php echo $Distrib_titleNew; ?>" name="btn_crear" />
        </a>
    <?php } ?>
    <div id="footer"> 
        <span class="f-left">&copy; 2012 <a href="http://www.forosdelweb.com/f13/index.php">a</a></span>
    </div>
<?php } ?>

</div></div></body></html> 

Etiquetas: formulario, header, html, input, php, tabla
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:29.