Basic example displays warning message

Basic example displays warning message

darakodarako Posts: 3Questions: 1Answers: 0

Hello,

Usually i don't face any problem with datatable but this time, even basic example doesn't work...

  <script>
    $(document).ready(function(){
      $('.datatable').dataTable();
    });
  </script>
      <table class='table table-bordered table-condensed datatable'>
        <thead>
          <tr>
            <th>Name</th>
            <th>red</th>
            <th>blue</th>
            <th>green</th>
          </tr>
        </thead>
        <tbody>
          {% for name, times  in mixer %}
            <tr>
              <td>{{name}}</td>
              <td>{{times.red}}</td>
              <td>{{times.blue}}</td>
              <td>{{times.green}}</td>
            <tr>
          {% endfor %}
        <tbody>
      </table>

I got this warning :

DataTables warning: table id=DataTables_Table_0 - Requested unknown parameter '0' for row 1. For more information about this error, please see http://datatables.net/tn/4

When i use datatable it works fine... Just i got this it's really boring.

Thank you in advance.

This question has an accepted answers - jump to answer

Answers

  • darakodarako Posts: 3Questions: 1Answers: 0
    edited June 2015

    btw i didn't see because I use that usually:

     $('.datatable').dataTable({
              'bPaginate': false,
              'bFilter': false,
              'bInfo': false,
              'bAutoWidth': false,
              'aaSorting': [],
          });
    
    

    But in my first message, i got many empty pages.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    Your HTML is invalid.

    tbody and its tr need closing tags.

  • darakodarako Posts: 3Questions: 1Answers: 0

    Ok... Shame on me, I really need to sleep. Thank you ... ,_,'

This discussion has been closed.