I have the following line in my JSP file:
<input type="button" name="btnNew" value="Új" class="button" onClick="clickSubmitButton('newRow'); isRowExists(<%tblMgr.isRowInDueCauseTable(request);%>)">
The isRowInDueCauseTable(request) method is returning a boolean value, but I'm not sure if I'm passing the boolean value to the javascript isRowExists function correctly, because I always get undefined, when I try to evaluate:
function isRowExists( isRowInDatabase ) {
console.log(isRowInDatabase);
if (isRowInDatabase == true) {
alert('Already in database');
}
}
How can I pass the java methods return value to the JavaScript function in JSP?