bProcessing and the processing style
bProcessing and the processing style
I want to have the "processing" image replace the contents of the table while the ajax request is being made back to the server. Currently the default "processing" placeholder just appears at the top of my page while the ajax request is running. I'm not understanding how to get my custom processing image/text/html to replace the contents of the data table.
In the dataTable init function I have the following
"bProcessing": true,
and
"sDom": '<"top"ilp><"bottom"ti><"clear">r',
I've moved the "r" part of the sDom attribute all over the place and it just always appear at the top of the page outside of the table.
Is there an example that shows how to implement your own custom processing image?
Thanks.
In the dataTable init function I have the following
"bProcessing": true,
and
"sDom": '<"top"ilp><"bottom"ti><"clear">r',
I've moved the "r" part of the sDom attribute all over the place and it just always appear at the top of the page outside of the table.
Is there an example that shows how to implement your own custom processing image?
Thanks.
This discussion has been closed.
Replies
ie
#reportdt_processing{background-color:Blue;}
What I don't get is how to make it replace the contents of the table during the loading phase.
First off, at the moment the only way to get an image into the processing element is by using css. The language string that is passes to DataTables is not used a HTML - this has been fixed now and will be released in the next version of DataTables. If you want to modify DataTables yourself, have a look at the function _fnFeatureHtmlProcessing() and the createTextNode() call - just replace that with a standard innerHTML statement.
Secondly, the processing element doesn't actually replace the contents of the table while some processing is occurring. Rather it is overlaid on top of the table. What you could do is set it's height and width to 100% if you want it to cover the whole table - this is something I left open for the design to decide what to do with it.
Hope this helps,
Allan
I can see how this approach would work and I will give it a go. I'll let you know what I end up with.