Making ID ATTRIBUTE of INPUT TAG dynamic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • infinity08
    New Member
    • Mar 2007
    • 1

    Making ID ATTRIBUTE of INPUT TAG dynamic

    I am using JSTL to dispaly the dynamic data from the session in JSP. I have a problem on making the ID attribute of INPUT tag dynamic. Below is the code.

    <table>
    <tbody>
    <c:forEach var="s" varStatus="r" items="${s.sail ings}">
    <tr>
    <td class="cell1">
    <input type="checkbox" name="pc" id="pc + ${r.count}”
    value="${r.coun t}" class="inputChe ckbox jsSelectTour_pc "/>
    </td>
    </tr>
    </c:forEach>
    </tbody>
    </table>

    Please help me on this
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by infinity08
    I am using JSTL to dispaly the dynamic data from the session in JSP. I have a problem on making the ID attribute of INPUT tag dynamic. Below is the code.

    <table>
    <tbody>
    <c:forEach var="s" varStatus="r" items="${s.sail ings}">
    <tr>
    <td class="cell1">
    <input type="checkbox" name="pc" id="pc + ${r.count}”
    value="${r.coun t}" class="inputChe ckbox jsSelectTour_pc "/>
    </td>
    </tr>
    </c:forEach>
    </tbody>
    </table>

    Please help me on this
    You did not specify the exact problem you are getting with it. Are you getting any error messages?

    Comment

    Working...