Im trying to invoke a javascript method in a hyperlink onClick setting a parameter in JSTL as below :
<c:if test="${not test1 && test2}">
<div class="alert alert-danger" role="alert">Message....
<a onclick="executeBusinessPatch(<c:out value="${paymentId}"/>)" style="color: #a94442"><b>Configure Now.</b>
</a>
</div>
</c:if>
function executeBusinessPatch(inAppPaymentTenderId) {
alert(inAppPaymentTenderId);
}
But im getting above error Uncaught SyntaxError: Invalid or unexpected token
when the hyperlink is clicked. What could be gone wrong?