how to call a function from page into its modal code example
Example: call function on modal open
$('#myModal').on('shown.bs.modal', function (e) {
// do something...
})
$('#myModal').on('shown.bs.modal', function (e) {
// do something...
})