Open modal made with bootstrap with java MVC

1

I'm doing a page with java MVC and Bootstrap. I have a view that is a modal, and I want to call it from the java driver class. That is to say on my main page, I want to press a button and that I open the modal that is in another page, this to not make a single web that loads everything together, I guess it would not be ideal. I'm not finding a way to do it.

Code example:

modelExample.html

modalEjemplo.html

<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <p>Modal body text goes here.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary">Save changes</button>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

Index.html

<%@ include file="includes/head.jsp" %>
<body>

Pagina principal:
 <a class="dropdown-item" href="" data-toggle="modal" data-target="#modalEjemplo">Abrir modal</a>
<%@ include file="includes/navbar.jsp" %>
<%@ include file="includes/footer.jsp" %>      

</body>

</html>

Thank you very much. Greetings

    
asked by Gastón Graziani 27.03.2018 в 00:39
source

0 answers