bProcessing usage
bProcessing usage
strangenova
Posts: 5Questions: 0Answers: 0
I have a large table that takes a bit to process in dataTables, so I was getting the 'flash' before the script would make it's rendering changes. I've set bProcessing to true, but nothing seems to happen as a result. Am I missing something in its usage?
Here's my initialization code:
$(document).ready(function() {
oTable = $('.datatable').dataTable({
"bProcessing":true,
"sPaginationType": "full_numbers",
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bPaginate":false ,
"bJQueryUI":true,
"aaSorting":[[1,'asc']]
});
} );
Here's my initialization code:
$(document).ready(function() {
oTable = $('.datatable').dataTable({
"bProcessing":true,
"sPaginationType": "full_numbers",
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bPaginate":false ,
"bJQueryUI":true,
"aaSorting":[[1,'asc']]
});
} );
This discussion has been closed.
Replies
Allan
Thanks for your help
One thing to note that I have seen before, it is possible that some browsers might not display this processing indicator until the rendering is complete - their attempt to stop the flash of unstyled content. Depending on your usage, this might or might not be an issue. I think the best approach is to try it and see!
Regards,
Allan
Cheers!
What should happen is that the processing element is "visibility: hidden" when not displayed. This appears to be working okay for me when used with my zero config example and bProcessing enabled. Is it not for you?
Regards,
Allan
then
[code]
tasksTable = $(document).ready(function() {
$('#tasks').dataTable({
"bPaginate": false,
"bLengthChange": false,
"bProcessing": true,
"bStateSave": true,
"aaSorting": [[2,'asc'], [3,'desc']],
"sDom": 'lfritp',
"aoColumnDefs": [
{ "bSearchable": false, "aTargets": [ 0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13] },
{ "bSortable": false, "aTargets": [ -1, -2, -3 ] }
]
});
} );
[/code]
the word 'processing' is visible behind the table and clearly visible when the table length is 0
There isn't a Javascript error cropping up anywhere is there?
Allan
Uncaught TypeError: Object # has no method 'dispatchEvent'
fire:3000/javascripts/prototype.js?1287044563:5653
_methodized:3000/javascripts/prototype.js?1287044563:431
fireContentLoadedEvent
I thought it was safe to ignore. (because it's prototype throwing)
Allan
I've now got rid of the prototype error (by removing prototype). That didn't work still so I just load the zero config demo.
The issue with the persistent 'processing' message is still there. Both on the latest chrome and IE9 on win7, with no extension loaded and a clear jscript console post load on both.
I think the problem is not with the datatables code though, but with how you shoud set this up. Please correct me if i'm wrong, you're supposed to:
1) create a div container and put it anywhere on the page:
[code]Processing...[/code]
2) do this:
[code] $(document).ready(function() {
$('#example').dataTable({"bProcessing": true});
} );[/code]
Correct? Or am I missing something?
Allan
Now the 'Processing' text box no longer persist when it shouldn't - which is good news.
And I know where the bug is the 174dev version! That's chrome latest (not beta), no extensions, no js errors, win7.
In a nutshell you can see it appear and disappear correctly as needed IF THE TABLE IS SMALL
But if the scrolling is disabled it will still try to center the message in the vertical middle of a large table... and of course the processing message is not visible to the user because vertically centered off screen.
I hope this helps.