Execute JavaScript After Datatable loading

Execute JavaScript After Datatable loading

  
Hello folks,

I have a problem when execute javascript in my webscreen. On the screen have a datatable with link on columns, when click in this link other datatable is loaded on the page but I need execute JS function to fixed header from table using DataTables Js plugin, however I catch exception from function because the function is executed before loading table.

I need execute my JS function after loading table on the screen, On my link column I use ajax request change to Submit but not working, the action RunJavaScript from HttpRequestHandler ever execute before loading table, I have no idea to solve this.

Anybody have a suggestions?
Hi Danillo,

Where is your function located? Try to put your javascript code directly on RunJavascript action, with an alert('!') - just to verify if its being executed. If you have a link with a destination action set, the Method property defined to Ajax Submit and it executes an ajax refresh and after the RunJavascript, it should work. 
Normally what I do is this:


// A $( document ).ready() block.
$( document ).ready(function() {
console.log( "ready! and dump you javascript after this" );
});