Problème avec sorttable.js

Fermé
LeHigh Messages postés 109 Date d'inscription mardi 12 mai 2009 Statut Membre Dernière intervention 6 septembre 2013 - 8 juin 2009 à 15:23
Bonjour,

Je souhaitais ordonner les données de mon tableau dont les lignes sont générées en PHP, donc je me suis tourné vers le javascript et j'ai trouvé un script sur internet: sorttable.js

https://kryogenix.org/code/browser/sorttable/

Le problème que je rencontre est que je n'arrive pas à m'en servir, je ne vois pas ou je me suis planté pour ca ne fonctionne pas.

je vous donne le code du tableau:

//ca figure dans le head
<script src="../pages/sorttable.js"></script>




	echo '<table class="sortable" width="100%"  border=1 cellspacing=0>';
			
					echo '<tr class="fondjaunepale_txtbleu12g">';
						echo '<th width="3%">Choix</th>';
						echo '<th width="13.5%" align="center">N° du micro</th>';
						echo '<th width="13.5%" align="center">Marque</th>';
						echo '<th width="13.5%" align="center">Type</th>';
						echo '<th width="13.5%" align="center">Utilisateur</th>';
						echo '<th width="13.5%" align="center">Service</th>';
						echo '<th width="13.5%" align="center">Unité</th>';
						echo '<th width="13.5%" align="center">Adresse ip</th>';
					echo '</tr>';
	echo '<tbody>';
		$_SESSION['tab_micro'] = $tab_micro;
		$i=0;
		while ($ligne = mysql_fetch_array ($res)) {
			$ref = $ligne[0];
			$num_m = $ligne[1];
			$marque = $ligne[16];
			$type = $ligne[17];
			$nom = $ligne[4];
			$service = $ligne [2];
			$unite = $ligne[3];
			$adrip = $ligne[9];
			
			$_SESSION['tab_micro'][$i] = $ref;
	
			
			//Affichage de la ligne correspondant à un micro
			echo '<tr class="fondblanc_txtbleu12">';
				echo '<td align="center" width="3%"><input type="radio" name="select" value="'.$ref.'"></td>';
				echo '<td align="center" width="12.5%">'.$num_m.'</td>';
				echo '<td align="center" width="13.5%">'.$marque.'</td>';
				echo '<td align="center" width="13.5%">'.$type.'</td>';
				echo '<td align="center" width="13.5%">'.$nom.'</td>';
				echo '<td align="center" width="13.5%">'.$service.'</td>';
				echo '<td align="center" width="12.5%">'.$unite.'</td>';
				echo '<td align="center" width="13.5%">'.$adrip.'</td>';
			$i++;
			echo '</tr>';
	
		}
		echo '</tbody>';
		echo '</table>';



merci de m'aider, car j'ai vraiment besoin d'ajouter une fonctionnalité comme celle ci à mon application.