I'm trying to pass some string parameters to a jQuery function in my page. My jQuery looks something like this
function showModal(text1, text2, text3) {
$('#modal1').text(text1);
$('#modal2').text(text2);
$('#modal3').text(text3);
$('#modal').modal('toggle');
}
And the line that's calling the function looks something like this
<spring:message javaScriptEscape="true" var="text1"
text="${obj1.text}"/>
<spring:message javaScriptEscape="true" var="text2"
text="${obj1.text2}"/>
<spring:message javaScriptEscape="true" var="text3"
text="${obj1.text3}"/>
<tr onclick="showModal('${text1}, ${text2}, ${text3}');">
I get an error in chrome when I click the table row
Uncaught SyntaxError: Unexpected number