Внутри
$(function () {
$.ajax({
url: "ajaxrout.php?JSON=1&file=do/do_api_info.php&getData=notification",
dataType: "json",
type: "get",
async: true,
success: function (res) {
if (res.result == "success") {
$(".inform_modal--dialog").html(res.data.notification.MESSAGE);
$("#notificationId").html(res.data.notification.ID);
res.data.notification.FRONT_SCRIPT ? $("#informModalScript").text(res.data.notification.FRONT_SCRIPT) : null;
informModal = new bootstrap.Modal($("#informModal"), {});
res.data.notification.length == 0 ? informModal.hide() : informModal.show();
}
},
});
}
Делается сетевой запрос, одно из полей ответа вставляется в тег скрипт, это informModalScript. И надо, чтобы этот вставленный ответ выполнился.