The following code successfully dynamically loads the "remote" page (data-remote="/booking-app-1") within the modal-body. However, this target page just contains a < script > which loads an IFrame (for an external payment application). This script does not execute. Is there a way to fix this, or a better way to just inject the booking applications's script via its URL directly into the modal-body? I've also tried swapping the data-remote URL to my page with the URL direct to the booking app's script but this did not work.
<button type="button" class="btn" data-toggle="modal" data-target="#bookingApp-1" data-remote="/booking-app-1" >
BUY THING 1
</button>
<!-- Modal -->
<div class="modal fade" id="bookingApp-1" tabindex="-1" role="dialog" aria-labelledby="bookingApp-1" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-body">
(CONTENT LOADS HERE)
</div>
</div>
</div>
<script> // I will have multiple modals with different scripts on the page
$('body').on('click.modal.data-api',
'[data-toggle="modal"]', function(){
$($(this).data("target")+' .modal-body').load($(this).data('remote')); });
</script>
/booking-app.php:
<script type="text/javascript" src="https://bookeo.com/widget.js?a=12345&type=1234_not_the_actual_url"></script>