JQuery DataTable 1.10 - Getting "Invalid JSON Response" Warning for valid response
JQuery DataTable 1.10 - Getting "Invalid JSON Response" Warning for valid response
Hi,
I have created a DataTable using Datatable 1.10 js. Table name is - #customprofile_table
When I click the button "Fetch Rules",I'm getting the warning popup "Invalid JSON Response",
but the datatable is populated with records. But I got the error in UI Console as > " Uncaught TypeError: Cannot set property 'data' of null".
The datatable is populated with ServerJSON response data "data.ruleList" as shown below:
_```
table1.clear();
table1.rows.add(data.rulesList);
table1.draw();
```
_
I have attached the JSP file (for Datatable creation) and the json output on the "Fetch Rules" button click event.
Can you help me to resolve this error.
Thanks in advance.
Sam
Answers
Could you give me a link to the page, or a debug trace (from immediately after you get the invalid JSON error) please?
Allan
HI Allan,
This error is not occurring after I have removed the line for reload() function.
table1.clear(); table1.rows.add(data.rulesList); table1.draw(); //table1.ajax.reload();
==> Commenting this line fixed this issueThanks a ton
God to hear you've got it working. To figure out what was going wrong before, I'd really need a link to the page.
Allan
Hi allan,
I dont know how to share the Link to the page as Im testing this in my local Tomcat server.
Is there any other way where you can get more details on this issue.
A debugger trace taken immediately after the invalid JSON error might show something.
Allan
Allan,
This is with respect to another thread (https://datatables.net/forums/discussion/38627/datatable-how-to-make-single-column-as-editable-column#latest). Can you provide some solution for that issue.