fishera
fishera

Reputation: 799

checking checkbox doesn't check it- JSP

Here is my JSP code:

<div class="right">
   <label class="styled-checkbox">
      <input id="${ErrorId}" type="checkbox" 
      <c:if test="${not empty resolvedBy}">
         <c:out value='checked' escapeXml="false"/>
      </c:if>
      class="js-issues-mark-resolved">
      <span> Mark as resolved </span>
   </label>
</div>

When I check the box check doesn't appear, can someone help me figuring it out?

Upvotes: 0

Views: 229

Answers (1)

R.Katnaan
R.Katnaan

Reputation: 2526

Try as follow:

<div class="right">
   <label class="styled-checkbox">
      <input id="${ErrorId}" type="checkbox" <c:if test="${not empty resolvedBy}">checked</c:if> class="js-issues-mark-resolved"/>
      <span> Mark as resolved </span>
   </label>
</div>

Upvotes: 1

Related Questions