I have created variable in javascript, which I need to access inside if condition.
Below code is not working, I'm not able to access variable created in javascript, getting blank value.
<script>
var isComplete= "No";
function startup(){
// some code which changing value for isComplete variable to "Yes";
}
</script>
<c:choose>
<c:when test="${isComplete == 'No'}">
<td> </td>
</c:when>
<c:otherwise>
<td><a href="JavaScript:send('<c:out value="id"/>')">Send</a></td>
</c:otherwise>
</c:choose>
I'm getting value of isComplete variable blank. How can I access it?
startup()function runs inside the browser, after the server has already finished processing the JSP. At the time of JSP processing, there is simply noisCompleteJS variable yet, so you cannot access it.