javascript - datatables empty table error -


I have a piece of code where I use the datatable plugin.

The table structure looks like this:

    

But note that I have been hiding the last four columns in the initial code.

In my code, I do the following:

  if ($ data-> response code <400) {echo HTML table}  < / Pre> 

this works

  else {echo & lt; Tr & gt; & Lt; Td colspan = 4 & gt; & Lt; H1 class = "error" & gt; '$ Data- & gt; Error message.' & Lt; / H1> & Lt; / Td> & Lt; / Tr & gt; '; }   

When I do this, I get the following error:

"Database warning (table id = 'databatables_tab)': The requested unknown parameter '1' Data Line ({"iDisplayLength": 100, "Data Source for Row 1"

Here is the database code:

  var oTable = $ ('Table1') "Ice Styling Fixed": [[0, 'de' ']], "AAserting": [[0,' ACC ']], "Ao column defs": [{"Beasible": Incorrect, "One Goal": [4,5,6, 7]}, {"b Searchable": wrong, "one goal": [1,2,3,4,5,6,7]}, {"b Searchable": true, "One Attention Yikrn ": [0]}]});   

Does anyone know what will happen because of this? I thought it was colspan, but when I remove it, the problem still exists. The strange thing is that I use it on the second page and it seems that it is OK to fix an empty result set.

It is not certain that it helps, but after a few games I have been able to show the following error in firebug:

"Type error: nTd is undefined"

If you frequently use datatabab, this is a common error that you will get. The reason for this is that the data format used to create data tables can not match the table columns, for example you have 4 columns while the source data can only provide 3 columns. You can post data format and table structure, I have to check the further problem.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -