JQuery DataTables population issue
JQuery DataTables population issue
Hi all,
I have encountered a strange problem with the following code
$(document).ready(function() {
$('#example').dataTable({
"bProcessing":true,
"sAjaxSource":'http://localhost/utcms/json_source2.txt'});
});
});
This code loads the data into the table if I run the page in safari no problem. My issue is that if I run the same page through django with a render_to_response all I get is the processing sign no data. upon debugging it simply says: Failed to load resource: Cancelled.
Its not an issue with not being able to find the source file, I've also discounted the possibility of an issue resulting from rendering the page and disrupting the fetch process. I must be missing something in datatable setup. its strange that it works on a static page but not on a django rendered page even though it sees the file otherwise it would generate a 404 for that file on debug.
Any suggestions would be welcome
Cheers
Chris
PS: I am new to JQuery and DataTables
I have encountered a strange problem with the following code
$(document).ready(function() {
$('#example').dataTable({
"bProcessing":true,
"sAjaxSource":'http://localhost/utcms/json_source2.txt'});
});
});
This code loads the data into the table if I run the page in safari no problem. My issue is that if I run the same page through django with a render_to_response all I get is the processing sign no data. upon debugging it simply says: Failed to load resource: Cancelled.
Its not an issue with not being able to find the source file, I've also discounted the possibility of an issue resulting from rendering the page and disrupting the fetch process. I must be missing something in datatable setup. its strange that it works on a static page but not on a django rendered page even though it sees the file otherwise it would generate a 404 for that file on debug.
Any suggestions would be welcome
Cheers
Chris
PS: I am new to JQuery and DataTables
This discussion has been closed.
Replies
Allan