2
good is the following I’m using datatables and when I click a value opens a modal. just wanted to put this open on a new tab and don’t know how to do.
would for example tab main clients where I have a form to search and show the datatables and after clicking open more details open a new tab.
example http://www.igest.pt/igest/
Modal
<div class="modal fade bs-detalhes-modal-lg" id="details" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body" id="conteudoModal">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-mini" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
the following script will add a new tab only that does not redirect me to it load (id) is an onclick that receives a value per parameter
function load(id) {
$.ajax({
method: "GET",
url: "./modals/info.php",
data: {id: id},
success: function (data) {
$('.nav-tabs').append('<li class="nav"> <a href="#detalhes" data-toggle="tab" id="' + id + '" onclick="update(this.id)">'+'Cod' + id + ' <button class="close closeTab" type="button" >×</button></a></li>');
$('.tab-content').append('<div class="tab-pane active" id="' + id + '"></div>');
$("#conteudoModal").html(data);
document.getElementById("show").style.display = "";
}
});
$('#detalhes').tab('active');
}
Post the code here to facilitate the analysis of the crowd.
– user28595
I have no code yet made
– usersantos
Where is the example on the site you gave?
– user28595
in the customer listing area, you have to do free testing, then when you click on the magnifying glass opens a new tab
– usersantos