load iframe in bootstrap modal

后端 未结 6 1630
青春惊慌失措
青春惊慌失措 2020-12-14 22:00

I want to load an iframe into a bootstrap modal and show a loader before the iframe is loaded. I am using a simple jquery click function, but it is not working. I do not und

6条回答
  •  北海茫月
    2020-12-14 22:19

    You can simply use this bootstrap helper to dialogs (only 5 kB)

    it has support for ajax request, iframes, common dialogs, confirm and prompt!

    you can use it as:

    eModal.iframe('http://someUrl.com', 'This is a tile for iframe', callbackIfNeeded);
    
    eModal.alert('The message', 'This title');
    
    eModal.ajax('/mypage.html', 'This is a ajax', callbackIfNeeded);
    
    eModal.confirm('the question', 'The title', theMandatoryCallback);
    
    eModal.prompt('Form question', 'This is a ajax', theMandatoryCallback);
    

    this provide a loading progress while loading the iframe!

    No html required.

    You can use a object literal as parameter to extra options.

    Check the site form more details.

    best,

提交回复
热议问题