简体   繁体   中英

how to load whole view(with styles and scripts) in bootstrap modal popup

I want to load one page into another(I'm working in laravel ). I have form on page, when user clicks on button bootstrap popup modal is shown. so i need to load whole page (include scripts and styles) in this bootstrap popup modal. the problem is my loaded page in popup, doesn't work correctly(i guess because of scripts. main page has bootstrap, jQuery and so on, and my popup view also has jQuery and bootstrap, and some other scripts, so as I see it loads these scripts two times). This is how console looks after my loaded page is poped out 在此处输入图片说明

I use laravel unisharp file manager github

here's my edit button

<a class="few_edits btn green default edit-vid-btn" href="#" data-toggle="modal" data-target="#edit-vid">Edit video</a>

my 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');

        });
    });

is there way to fix it?

If you have the same problem, just append your loaded data in iframe. that's it)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM