In my messages I have:
resetPassword.sending.email=Sending email
resetPassword.sending.sms=Sending sms
I want to use it in the HTML and JQuery but I am unable to pass the variable to form the message. I will have multiple messaging methods so I can't just use if else statement, it has to be dynamic.
<script th:inline="javascript">
$("#sendButton").click(function(e) {
sedingMethod = $(this).data('method'); // can be 'sms' or 'email'
$("#sendingMessage").text([[#{resetPassword.sending.[sedingMethod]}]]);
});
</script>