i've been trying to sort a table using ajax for sometime now but the table doesn't sort at all. what could be the problem?im using sorttable.js (http://www.kryogenix.org/code/browser/sorttable/)this is the code im usingany help offered will be appreciated\[code\]<script src="http://stackoverflow.com/questions/2084876/resources/sorttable.js" type="text/javascript"></script> <!-- ON GOING --> <div class="TabbedPanelsContent"><div style="padding: 10px;"><table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0" class="sortable"><b>Ongoing: <?php echo $totalRows_progress ?> </b><p></p><?php// Make a MySQL Connectionmysql_select_db("speedycms") or die(mysql_error());// Get all the data from the "example" table$result = mysql_query("SELECT * FROM tbl_accident WHERE progress='ongoing' ORDER BY id ASC") or die(mysql_error()); // Define $color=1 $color="1";echo '<thead><tr bgcolor="#cccccc"> <th width="45px" align="left">Case ID</th> <th width="90px" align="left">Solicitor/Case Ref</th> <th width="225px" align="left">Client Name/Address</th> <th width="70px" align="left">Accident Date</th> <th width="65px" align="left">Case Opened</th> <th width="55px" align="left">Total Days</th><th width="55px" align="left"></th> </tr></thead>';while($rows=mysql_fetch_array($result)){$caseOpen = date('d/m/Y', strtotime($rows['caseOpen']));$caseOpen2 = date('Y-m-d', strtotime($rows['caseOpen']));$days = (strtotime(date("Y-m-d")) - strtotime("$caseOpen2")) / (60 * 60 * 24);$days2 = round($days);// If $color==1 table row color = #FFC600if($color==1){echo "<tbody><tr bgcolor='#f2f2f2' valign='top'><td>".$rows['id']."</td><td>".$rows['currentSolicitor']."<BR>".$rows['caseReference']."</td><td><a href='http://stackoverflow.com/questions/2084876/viewclient.php?id=".$rows['id']."' class=\"box\">" .$rows['clientName']."<BR> ".$rows['address']."</a></td><td>".$rows['doaDay']."/".$rows['doaMonth']."/".$rows['doaYear']."</td><td>".$caseOpen."</td><td>".$days2."</td><td><a href='http://stackoverflow.com/questions/2084876/manageclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/manage.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/viewclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/view.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/editclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/edit.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/printclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/print.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/deleteclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/no.png' border='0'></a></td></tr></tbody>";// Set $color==2, for switching to other color $color="2";}// When $color not equal 1, use this table row color else {echo "<tbody><tr bgcolor='#ffffff' valign='top'><td>".$rows['id']."</td><td>".$rows['currentSolicitor']."<BR>".$rows['caseReference']."</td><td><a href='http://stackoverflow.com/questions/2084876/viewclient.php?id=".$rows['id']."' class=\"box\">" .$rows['clientName']."<BR> ".$rows['address']."</a></td><td>".$rows['doaDay']."/".$rows['doaMonth']."/".$rows['doaYear']."</td><td>".$caseOpen."</td><td>".$days2."</td><td><a href='http://stackoverflow.com/questions/2084876/manageclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/manage.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/viewclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/view.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/editclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/edit.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/printclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/print.png' border='0'></a><a href='http://stackoverflow.com/questions/2084876/deleteclient.php?id=".$rows['id']."' target='blank'><img src='http://stackoverflow.com/questions/2084876/resources/no.png' border='0'></a></td></tr></tbody>";// Set $color back to 1 $color="1";}}echo '<tfoot><tr><td></td></tr></tfoot>';?> \[/code\]