Java : Pass an parameter from href to a div

i’m working on my jsp and i try to pass a parameter to a div, i put the parameter in the href:

href="#modal1?name=<c:out value="${module.name}"/>"

but i don’t know how to get it in the div #module1 :

      <tbody>
    <c:forEach items="${modules}" var="module">
        <tr>
            <td><c:out value="${module.name}"/></td>
            <td><c:out value="${module.type}"/></td>
            <td><c:out value="${module.atk}"/></td>
            <td><c:out value="${module.def}"/></td>
            <td><c:out value="${module.pulse}"/></td>
            <td><c:out value="${module.timer}"/></td>
            <td><a class="waves-effect waves-light btn modal-trigger padd-reduit" href="#modal1?name=<c:out value="${module.name}"/>"><i class="mdi-action-shopping-cart left small"> <c:out value="${module.token}"/> token</i></a></td>                  
            <div id="modal1" class="modal">
              <div class="modal-content">
                <h4>Voulez vous vraiment acheter ce module ?</h4>
                <p></p>
              </div>
              <div class="modal-footer">
                <a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Oui</a>
                <a href="#!" class=" modal-action modal-close waves-effect waves-red btn-flat">Non</a>
              </div>
            </div>
        </tr>
    </c:forEach>
      </tbody>


Source: jsp

Leave a Reply