This see here 1 or see here 2 or atleast if you searched around on stackoverflow, you would get some great solutions.
You haven't provided additional details for instance whether you are using a frontend framework like angular or ember.js or just plain HTML/JS combination as some of these frameworks tend to impose some additional conventions.
Otherwise, if it's plan HTML and JS with bootstrap 3 framework from this read more, follow these 2 basic steps.
Create a link with id
<a class="" href="/log/viewslim?id=72" title="View" data-target="#myModal" data-toggle="modal">View 72</a>
Watch for the trigger on the link
// this is just an example, remember to adapt the selectors to your code!
$('.modal-link').click(function(e) {
var modal = $('#modal'), modalBody = $('#modal .modal-body');
modal
.on('show.bs.modal', function () {
modalBody.load(e.currentTarget.href)
})
.modal();
e.preventDefault();
});
NOTE: You need to spend sometime understanding how it all works together.