javascript - call page in iframe with bootstrap modal? -


i use this bootsrap modal plugin , call page in it. when page needs postback or redirection, not happen in modal, changes page. want show pages in iframe in boostrap modal.

this modal func. code; how should modify show contents in iframe?

$.fn.modal.defaults.spinner = $.fn.modalmanager.defaults.spinner =       '<div class="loading-spinner" style="width: 200px; margin-left: -100px;">' +         '<div class="progress progress-striped active">' +           '<div class="progress-bar" style="width: 100%;"></div>' +         '</div>' +       '</div>';      $.fn.modalmanager.defaults.resize = true;      var $modal = $('#ajax-modal');      $('.modal-edit').on('click', function () {         // create backdrop , wait next modal triggered         $('body').modalmanager('loading');          var edit = $(this).attr("data-id");         settimeout(function () {         $modal.load('user.aspx?edit=' + edit + '', '', function () {             $modal.modal();         });         }, 100);     }); 

this modal modal div:

  <div id="ajax-modal" class="modal fade" tabindex="-1" data-width="760" data-replace="true">   </div> 

try this;

    $('.modal-edit').on('click', function () {             // create backdrop , wait next modal triggered             $('body').modalmanager('loading');             var edit = $(this).attr("data-id");             settimeout(function () {                 $modal.on('show', function () {                     $('iframe').attr("src", 'customer_user.aspx?edit=' + edit + '');                 });                 $modal.modal()                 //$modal.load('customer_user.aspx?edit=' + edit + '', '', function () {                 //    $modal.modal();                 //});             }, 100);         });   <div id="ajax-modal" class="modal fade" tabindex="-1" data-width="760" >                         <iframe ></iframe>                     </div> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -