Vote count:
0
I have few buttons with dynamic id
<input type="submit" id="v-18" data-target="myModal"/>
<input type="submit" id="v-19" data-target="myModal"/>
<input type="submit" id="v-20" data-target="myModal"/>
After click for some specific button, this ID will be add such as parameter using jquery(ajax/post).
$('[data-target="#myModal"]').click(function() {
var checkId = $(this).attr('id');
checkId = checkId.replace('v-', '');
$.post("#", { theCheckId: checkId} );
});
After this, I need to check the theCheckId value
<c:if test="${not empty param.theCheckId}">
// do something
</c:if>
But the code in <c:if test="${not empty param.theCheckId}"> is not works. So I tried to debug it, and after clicking by the button, I set a breakpoint before if expression, and in debug try watched the request.getParameter('theCheckId') => 20. Cool! I have a no-empty variable, but why the code after IF - jstl is not works?
asked 13 secs ago
JSTL param.variable is null using AJAX
Aucun commentaire:
Enregistrer un commentaire