538
Views
2
Comments
Execute JavaScript After Datatable loading
Question
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?
2017-10-09 20-45-22
André Siébra
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. 
2016-04-21 20-09-55
J.
 
MVP
Normally what I do is this:


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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.