I have tried to show the data into the dialog but this does not work, the modal show the data as written in the html...any help?
$(document).ready(function(){
$('#billDetail').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); // Button that triggered the modal
var billId = button.data('whatever');
var url = "/admin/bills/find";
$.ajax({
type: "GET",
dataType: 'json',
url: url,
data: {
"billId" : billId
}, // Adjuntar los campos del formulario enviado.
success: function(data)
{
var modal = $(this)
modal.find('.modal-title').text('New message to ' + data)
modal.find('.modal-body input').val(data)
modal.show();
}
});
});
});
It should be .html
not .text
modal.find('.modal-title').html('New message to ' + data);
Hope this will help you.