[英]how to load whole view(with styles and scripts) in bootstrap modal popup
我想將一頁加載到另一頁中(我在laravel中工作)。 我在頁面上有表單,當用戶單擊按鈕引導程序彈出模態時。 因此,我需要在此引導彈出窗口模式中加載整個頁面(包括腳本和樣式)。 問題是我在彈出窗口中加載的頁面無法正常工作(我想是因為腳本所致。主頁具有bootstrap,jQuery等,並且我的彈出視圖也包含jQuery,bootstrap和其他一些腳本,因此我看到了它會兩次加載這些腳本)。 這是彈出加載頁面后控制台的外觀
我使用laravel unisharp文件管理器github
這是我的編輯按鈕
<a class="few_edits btn green default edit-vid-btn" href="#" data-toggle="modal" data-target="#edit-vid">Edit video</a>
我的js
$(function(){
$(".edit-vid-btn").on('click', function(){
//window.open('/laravel-filemanager/?type=Files', 'File Manager',"width=700,height=500");
/*$.ajax({
url: "/laravel-filemanager/?type=Files",
type: 'get',
success: function(data) {
$('.modal-video-cont').append(data);
}
})*/
$('.modal-video-cont').load('/laravel-filemanager/?type=Files');
});
});
有辦法解決嗎?
如果您有同樣的問題,只需將已加載的數據附加到iframe中即可。 而已)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.