Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/05/2012, 10:29
Avatar de luna690
luna690
 
Fecha de Ingreso: marzo-2012
Ubicación: Barcelona
Mensajes: 61
Antigüedad: 12 años, 1 mes
Puntos: 3
Problemas con una tabla ordenable

Hola!

Tengo una tabla que se podía ordenar. La cuestión es que estos días he estado modificando todo el código y ahora no entiendo porqué no se me ordena. Lo hago con JQuery.

He estado varias horas, comparando versiones que tengo. Pero lo veo igual.
Antes tenía todo el código junto. Ahora lo he separado en archivos y hago un include("cabecera");

No se si es de eso que no me funciona. Para hacer la cabecera a parte, he tenido que incluir más archivos javascript de los que tenía antes. Pero no se si se solapan los unos a los otros. Alguien que sepa me puede ayudar?

Cabecera :
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ca" lang="ca">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><?php include("../messages.php"); echo $titleWeb; ?></title>
<meta name="author" content="Laia L." />
<meta name="date" content="2012-10-01" />
<meta name="keywords" content="web, tkt brainpower, brainpower" />
<meta name="description" content="" />

<link href="../estils/img/tktblack.png" rel="icon" type="image/gif">
<link href="../estils/css/screen.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="../estils/style.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="../estils/jquery/jTPS.css" rel="stylesheet" type="text/css">
<link href="../estils/jquery/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />

<script src="../estils/prototype.jsp" type="text/javascript"></script>
<script src="../estils/funcions.js" type="text/javascript"></script>
<script src="../estils/jquery/jquery.js" type="text/javascript" ></script>
<script src="../estils/jquery/jTPS.js" type="text/javascript"></script>
<script src="../estils/jquery/jquery.mousewheel-3.0.4.pack.js" type="text/javascript"></script>
<script src="../estils/jquery/jquery.fancybox-1.3.4.js" type="text/javascript"></script>

<script>
	!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');
</script>

</head>

<body>
<div id="layout">  
  <div id="header"> 
  
    <?php ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	session_start(); if (!isset($_REQUEST['opc'])){   ?>
    <h1 id="logo"><a href="../index.php"><span class="light"></span><span class="leaf">&nbsp;</span></a></h1>
        
    <hr class="noscreen" /> 
    	<p class="noscreen noprint"> <em>Skip to <a href="#obsah">content</a>, <a href="#nav">navigation</a>.</em> </p>
    <hr class="noscreen" />
    
    <div align="right"><img src="../img/icon_login.png" alt="foto_login" width="20" height="20" />
		<?php if (isset($_SESSION['persona_nom'])){ echo $princ_hola.ucfirst($_SESSION['persona_nom'])."<br />"; }
		  	
			  if (!isset($_SESSION['persona'])){ ?>
					<b><a style="color:#FFF" href="form_login.php"><?php echo $connect; ?></a></b><br />
		<?php }else{ ?>
					<b><a style="color:#FFF" href="funcions.php?funcio=tancar_sessio"><?php echo $disconnect; ?></a></b> <?php } ?>
        </div>
    
    <div id="nav" class="box">
        <ul>
            <?php if (isset($_SESSION['persona']) && $_SESSION['persona'] == 'A') { ?>
            	<li><a href="form_gestioIncidencies.php?g=A"><?php echo $menu_h1; ?><br /><span><?php echo $submenu_h1; ?></span></a></li>
			<?php } ?>
            <li><a href="form_mostrar_incidencies.php?g=M"><?php echo $menu_h2; ?><br /><span><?php echo $submenu_h2; ?></span></a></li>
            <li><a href="form_mostrar_incidencies.php?g=C"><?php echo $menu_h3; ?><br /><span><?php echo $submenu_h3; ?></span></a></li>
            <?php if (isset($_SESSION['persona']) && ($_SESSION['persona']=='A' || $_SESSION['persona']=='T')){ ?>
            	<li><a href="form_estadistica.php"><?php echo $menu_h4; ?><br /><span><?php echo $submenu_h4; ?></span></a></li>
            <?php } ?>
          </ul>
      	<hr class="noscreen" />
    </div>
    <?php /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
	} include("funcions.php"); ?>
    
    
Pagina :
Código HTML:
<?php include("web-capsalera.php"); ?>


<script type="text/javascript">
	$(function () { 
		$('#taulaMaq').jTPS( {perPages:[5, 6, 10, 20, 50, 'TOTS']} );
	});
</script>
 

<div id="container" class="box" align="center">
   
    <h2 align="center"><?php echo $Maquina_titleTable; ?></h2> 
    
    <?php if (isset($_GET['filtre_descr']) || $total_maquines>0){ ?>
    <table id="taulaMaq" align="center">
        <thead>
            <tr bgcolor="#324455" align="center" style="font-weight:bold; text-decoration:underline;">
                <th></th>
                <th width="500" sort="descr"><?php echo $Generic_description; ?></th>
                <th width="100" sort="empresa"><?php echo $Maquina_distributorCompany; ?></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"; ?>" />
                <td></td>
                <td><input type="text" name="filtre_descr" size="60" /></td>
                <td><input type="text" name="filtre_empresa"  /></td>
                <td>
                <input type="image" src="../img/lupa.png" value="Filtrar" title="<?php echo $searchfiltre_title; ?>" onclick="canviarFiltreMaquina(); return false;" />
                <input type="image" src="../img/icon_reset.png" value="Netejar filtre" title="<?php echo $clearfiltre_title; ?>" onclick="borrarFiltreMaquina(); return false;" />
                </td>
                </form>
            </tr>
        </thead>
        
        <tbody>
            <?php while ($rs = mysql_fetch_assoc($result1)){ 
			$nom_empresa = get_nom_distribuidor($rs['maq_empresa_distribuidora']); ?>
            <tr>
                <td><a onmouseover="perSobre(this)" onmouseout="perFora(this)" <?php if (!isset($_REQUEST['opc'])){ ?> onclick="alClicarModifyMaquina(this)" <?php }else{ ?> onclick="alClicarGestioIncidenciaMaquina(this)" <?php } ?> class="cssID"><?php echo $rs['maq_id']; ?></a></td>
				<td><?php echo $rs['maq_descr']; ?></td>
                <td><?php echo $nom_empresa[0]; ?></td>
                <td><a onclick="confirmarEliminar('funcions.php?funcio=borrar_maquina&id=<?php echo $rs['maq_id']; ?>'); return false;"><img src="../img/icon_delete.png" alt="" /></a></td>
            </tr>
            <?php } ?>
        </tbody>
        
        <tfoot class="nav">
            <tr>
                <td colspan="3">
                    <div class="pagination"></div>
                    <div class="paginationTitle"><?php echo $paginationTitle; ?></div>
                    <div class="selectPerPage"></div>
                </td>
            </tr>
        </tfoot>
        
    </table>
<?php }else echo $Maquines_empty; ?>