How to execute javascript snippet after list view is loaded?

1
I am trying to execute some javascript code to attach event listeners on the list items inside a list view: But I think the javascript snippet gets executed before the list view elements are rendered because of which the event listeners are not getting added. Is there a way through which I could execute the javascript snippet after the list elements are rendered?
asked
1 answers
0

Maybe you can use addOnLoad, it's a javascript funtion that executes when the client is completely loaded. An example is: mx.addOnLoad(function() { console.log("You can use client functionality now"); });

You can find more here: https://apidocs.rnd.mendix.com/9/client/mx.html

 

If this does not work, you can also set a timeout to let the function run later.

answered