Marconi gave the solution of using iframe, which is not very recommended (is that actually, depends on the application, if it is only this modal and is simple thing has no problem, but imagine Facebook for example, or any system in reality...)
Another solution is to make an Ajax request, here with Jquery:
//Open Modal
function loadModal(modalPage, modalBox, button){
$.ajax({
url: "/modals/" + modalPage,
async: true,
success: function(data){
$("#" + modalBox + " .modal-body").html(data);
button.removeAttribute("onclick");
},
beforeSend: function(){
$("#" + modalBox + " .modal-body").html("<img src='/images/loading.gif'> Carregando...");
},
error: function(){
$("#" + modalBox + " .modal-body").html("Ocorreu uma erro!");
}
});
}
This is a function I made for a project and it’s very easy to use, name of variables:
modalPage: The address of the page to be loaded into the modal.
modalBox: Is the id
of the modal being loaded, then you can load in several modals on the page, you adapt to your ai.
button: This is the button that opens the modal, I disable it so the person does not click twice.
Well, just adapt to your code there, tidy the addresses, ids and classes according to yours! I hope you helped!
I do not know if it is the right thing to do, but the inclusion of an iframe within that modal could be a solution.
– Luís Almeida
could exemplify with a code ?
– alessandre martins
It’s unclear if you really want to open another page or if you want to load some specific content dynamically...because if so just use some ajax in jquery or even some other Angular resource, which I’m not aware of yet.
– Kenny Rafael
This html page that will load pulls data from the database?
– Bia
yes, it’s a registration and consultation form
– alessandre martins