Im a little bit confuse about firing a call back function in javascript modal of bootstrap3. In normal jquery.post
you can do it like,
$.post(\
Just a little to add for the 1st answer, it is because when the callback is triggered the DOM inside the modal is not completely loaded yet, perhaps should do a little hack here to holdback the action after callback for a while. Hope it helps!
$('#myModal').on('show.bs.modal', function (e) {
setTimeout(function(){
// something here
}, 300);
});