I'm iterating through a list of Message Objects.
I'm using th:each to create a table that I can add functionality to. My problem is that when I'm trying to pass a messageId over to a function that will be used to set a variables value, the th:onload isn't invoking it. I'm using the exact same syntax for a th:onclick that invokes a function and it works as expected.
Am I missing something?
<td class="td-text" th:attr="onload=|passMessageId('${messageobj.messageId}')|">
</td>