How to assign a variable value in javascript and use it in html?
My javascript code:
function validateUrl() {
var displayButton = "Yes";
}
My html code:
<c:if test="${displayButton == 'Yes' "
</c:if>
How can i use a javsacript variable in my html?
<c:if>tag yourself, or is there some templating system which actually handles that? If so the problem simply becomes when Javascript executes and when the template is parsed. Usually Javascript executes after templates are parsed, soooo... no.