sDom injection and bServeSide processing

sDom injection and bServeSide processing

mmaxmmax Posts: 2Questions: 0Answers: 0
edited January 2013 in General
Hi,

I'm fighting with the problem injecting my own toolbar via sDom variable as explained in the documentation. My sDom string looks like:

[code]"sDom": 'lT<"#rechnung_liste_toolbar">frtip',[/code]

And I can see the div element with the id rendered properly but if I want to access it via jQuery selector like this (code below datatables initialization):

[code]$('#rechnung_liste_toolbar').html('Toolbar');[/code]

The new html content is not set. I used firebug to find the problem and figured out that when i set a breakpoint at the line above, the right content (Toolbar

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Try setting your HTML in fnInitComplete - I think you need to wait for the table to be fully initialised before you can manipulate the DOM like that. Although thinking about it, that's a bit naff. I'll look into it...

    Allan
  • mmaxmmax Posts: 2Questions: 0Answers: 0
    Thanks very much ... it work's, and saved my day ... or at least ac ouple of hours ;-)
    I was allready searching for an function like this but couldn't find it.

    Thanks again,
    Max
This discussion has been closed.