fnFooterCallback with bJQueryUI

fnFooterCallback with bJQueryUI

asaasa Posts: 20Questions: 0Answers: 0
edited October 2009 in General
Hi
i want to have total (fnFooterCallback) and jqueryui (bJQueryUI)theme at the same time ..
this what i did
[code] oTable= $('#example').dataTable( {
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "mainjson.jsp",
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
/*
* Calculate the total market share for all browsers in this table (ie inc. outside
* the pagination)
*/
var iTotalMarket = 0;


for ( var i=0 ; i

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Hi asa,

    lol - the footer is that the top of the table? :-). I can only guess that this is due to something odd going on in CSS... I've tried sticking a footer in on my demo of the jQuery UI theming and it works without a problem (the footer was unstyled by DataTables, but that's not unreasonable I think).

    If you haven't been able to make any progress with this, then perhaps you could post a link showing the problem?

    Regards,
    Allan
  • asaasa Posts: 20Questions: 0Answers: 0
    hehehe ,sorry if i wasn't clear ..
    see this pic
    http://img210.imageshack.us/img210/9076/totalpic.png
    i want it where the Here word in pic is showing .. How to do that?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Hi asa,

    Thanks for the picture - makes sense now :-). The issue you have there is that the structure is something like this:

    [code]
    div for top information
    table
    thead
    tbody
    tfoot
    /table
    div for bottom information
    [/code]
    Which is exactly what is being shown in your picture. So what you might be looking for is not a table footer (in the technical sense) but rather a new element in the bottom information wrapper, into which you can insert your live information. This could be added in using sDom, and still updated using the fnFooterCallback function.

    Another option might be to integrate the look and feel of the tfoot element into your table. To do this, you might simply apply the class "ui-state-default" to each TD element in the footer.

    Regards,
    Allan
  • XavierKXavierK Posts: 1Questions: 0Answers: 0
    Hi, I'd a bug with IE and innerHTML who I guess is only for reading in this browser. You should play with document.createElement or document.createTextNode and appendChild
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I suspect that asa has probably wrapped up this problem now, given that the original post is more than two years old! However you are quite right, using DOM methods is certainly a good idea to try and avoid injecting invalid HTML into the document.

    Allan
This discussion has been closed.