Getting a "No data available in table" error

Getting a "No data available in table" error

tyanweitingtyanweiting Posts: 2Questions: 0Answers: 0
edited May 2013 in General
Hello,

I am trying to initialize the dataTables plug-in and am getting the "No data available in table" error. I am using Handlebars.js to create a table template using JSON. Is there a trick i'm missing? Are these various js scripts compatible?

$(document).ready(function(){
$('#reports-table').dataTable();
$.ajax({
url: "/custom/json-test.php",
type: "POST",

data:{ "service_name" : "getReportsByProfileId","profile_id" : "16017"}
}).done(function(data) {

...
});
});


...(handlebarsstuff)...

Replies

  • tyanweitingtyanweiting Posts: 2Questions: 0Answers: 0
    Just kidding. Here's how i did it: Make sure you place your $('#reports-table').dataTable(); line AFTER you compile your handlebars template, var theTemplate = Handlebars.compile (theTemplateScript);

    Hope this helps something out there.
This discussion has been closed.