Why doesn't tablesorting work?



  • I've got a job to make it possible to sort the table by name or name. I've got a flame from here. http://tablesorter.com/docs/ Connected as specified in the documentation. But it doesn't work. The table is automatically generated. What's the problem? Where to?

    <table id="myTable" class="tablesorter" align="center" border="1">
        <thead>
        <tr>
        <td>Фамилия</td>
        <th>Имя</th>
        <th>Возраст</th>
        <th>Телефон</th>
        <th>Умеет водить</th>
        <th>Статус</th>
        <th>Редактировать</th>
        </tr>
        </thead>
    

    There's a piece of the code for propagation, and then the table's out.

    while($row = mysql_fetch_assoc($result)):?>
    <tbody>
    <tr>
    <td> <?echo $row['sname'];?> </td>
    <td> <?echo $row['name'];?> </td>
    <td> <?echo calculate_age($row['dateb']);;?> </td>
    <td> <?echo $row['mob'];?> </td>
    <td> <?echo $row['buses'];?> </td>
    <td> 
    <input id='input<?=$row['id']?>' name='active' type='checkbox' value ='<?=$row["active"]?>' onchange="on_change(<?=$row['id']?>)" <?php if($row['active'] == '1') {echo 'checked="checked"';} else { echo "";} ?> />
    </td> 
    <td> <a href = "index.php"> Изменить </a> </td>
    </tr>
    </tbody>
    <? endwhile;?>
    </table>
    


  • Got it. The thing is, tbody's tag hit the cycle. If you put it in front of the cycle, it's all right.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2