2010-09-21 90 views
0

我想要显示loading.gif点击jQuery UI对话框与iframe直到页面加载到iframe中。有人知道这个问题吗?可能吗? 这是我的代码:显示loading.gif直到页面加载到iframe里面的jQuery UI对话框

$('.dialog').click(function(e) { 

    e.preventDefault(); 
    var $this = $(this); 
    var horizontalPadding = 30; 
    var verticalPadding = 30; 

    $('<iframe id="externalSite" class="externalSite" src="' + this.href + '" />').dialog({ 
     title: ($this.attr('title')) ? $this.attr('title') : 'External Site', 
     autoOpen: true, 
     width: 800, 
     height: 500, 
     modal: true, 
     buttons: { 
      "Zatvori": function() { 
       $(this).dialog("close"); 
      } 
     }, 

     resizable: true, 
     autoResize: true, 
     overlay: { 
      opacity: 0.5, 
      background: "black" 
     }, 

     close: function(event, ui) { 
      $(function() { 
       var theVal = $.cookies.get('updatedForm'); 

       if (theVal != null) { 
        $.cookies.del('updatedForm'); 
        location.reload(true); 
       } 
      }); 
     } 

    }).width(800 - horizontalPadding).height(500 - verticalPadding); 
+0

也许通过用ui对话框实现块ui?但是如何? – Ogi 2010-09-21 09:37:54

回答

相关问题