Defered Rendering with Local Ajax source
Defered Rendering with Local Ajax source
_jthomas
Posts: 75Questions: 0Answers: 0
Hi Allan,
First and foremost, Just tripped on your datatables last week and was bowled over ever since. Hats off for creating a "magical" (Hope it doesn't upset Apple :-) ) product.
Background:
Using sAjaxSource locally with deferred rendering.The local data file is approximately 11 MB with approximately 21K records. Please advise on the following and thanks very much. Let me know if I am doing something wrong. I am also attaching some relavant piece of code at the end.
IE 7
a) The file gets loaded but IE 7 pops up the dialog box warning of long running script. Is there a way to avoid this warning. IE 7 loads everthing though.
b) Though properties like ""aLengthMenu" is specified, the grid still defaults showing 10 records in single page. The total record count is correct though.
Chrome 11
The page displays "Loading..." and does nothing.
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": "file:///C:/arrays.txt",
"bDeferRender": true,
"aLengthMenu": [[1000, 2500, 5000, -1], [1000, 2500, 5000, "All"]]
} );
} );
Customer #
Customer Name
Phone Number
Avg Volume($ amount)
GPO Contract Name/#
Customer #
Customer Name
Phone Number
Avg Volume($ amount)
GPO Contract Name/#
[/code]
Regards
Joson
First and foremost, Just tripped on your datatables last week and was bowled over ever since. Hats off for creating a "magical" (Hope it doesn't upset Apple :-) ) product.
Background:
Using sAjaxSource locally with deferred rendering.The local data file is approximately 11 MB with approximately 21K records. Please advise on the following and thanks very much. Let me know if I am doing something wrong. I am also attaching some relavant piece of code at the end.
IE 7
a) The file gets loaded but IE 7 pops up the dialog box warning of long running script. Is there a way to avoid this warning. IE 7 loads everthing though.
b) Though properties like ""aLengthMenu" is specified, the grid still defaults showing 10 records in single page. The total record count is correct though.
Chrome 11
The page displays "Loading..." and does nothing.
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": "file:///C:/arrays.txt",
"bDeferRender": true,
"aLengthMenu": [[1000, 2500, 5000, -1], [1000, 2500, 5000, "All"]]
} );
} );
Customer #
Customer Name
Phone Number
Avg Volume($ amount)
GPO Contract Name/#
Customer #
Customer Name
Phone Number
Avg Volume($ amount)
GPO Contract Name/#
[/code]
Regards
Joson
This discussion has been closed.
Replies
Update - It seems by disabling sorting the IE warning went away. Is there a way to dynamically enable or disable sorting and I presume either way, sorting this huge a record set will anyway cause the warning to pop up in IE? Please advise and thanks very much.
[code]
"bAutoWidth": false,
"aaSorting": [],
"iDisplayLength": 1000,
"aLengthMenu": [[250, 500, 1000, -1], [250, 500, 1000, "All"]]
[/code]
b. http://datatables.net/usage/options#iDisplayLength is used to set the initial page length
c. Chrome - is there a Javascript error or anything?
Allan
Chrome just displays "Loading..." between table header and table footer and "Processing..." just under table footer.
Thanks!!!
Joson
XMLHttpRequest cannot load file:///C:/arrays.txt?_=1307393011034. Origin null is not allowed by Access-Control-Allow-Origin.
is the error
I passed the --allow-file-access-from-files to chrome.exe and it is now working and stunning fast too.
Regards
Joson
Regards
Joson
Regards,
Allan
The local data file is approximately 16 MB with approximately 250K( not 21K records as reported earlier) records.
Regards
Joson