Why does reloading the datatable result in the message No data available.

Why does reloading the datatable result in the message No data available.

dt_userdt_user Posts: 51Questions: 16Answers: 0

This happens after i click on the update button. I would like to know why this is so?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765

    Is the Update button in conjunction with using Editor or something else?

    If you are using ajax.reload() then start by using the browser's developer tools > network tab to see the XHR response data. What do you receive?

    Kevin

  • dt_userdt_user Posts: 51Questions: 16Answers: 0

    sometimes i get the index.html file that i used to create the table.

  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765

    sometimes i get the index.html file that i used to create the table.

    You will need to look at your server logs to determine why this is happening.

    Kevin

  • dt_userdt_user Posts: 51Questions: 16Answers: 0

    ok. Can you please direct me where the sever logs are located?

  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765

    That's dependent on the web server. The docs for the web server you are using should tell you.

    Kevin

  • dt_userdt_user Posts: 51Questions: 16Answers: 0

    ok. How do I explicitly tell datatables what new content it should be reloaded with? Because after the ajax call (success function)[NOT datatables ajax option] I write table.draw() in a setInterval() and the table isnt refreshed with the new data i just inserted into the database.

  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765
    Answer ✓

    draw() isn't going to add data to the table. You would use rows.add() in the success function with draw() to have Datatbles update the display.

    Kevin

  • dt_userdt_user Posts: 51Questions: 16Answers: 0

    thanks alot. It worked.

This discussion has been closed.