0

如果我在不加载外部内容的情况下加载 JQuery UI 对话框,则可以使用“关闭”按钮关闭该对话框,并且可以多次重新打开该对话框。如果我加载内容,这两个功能都不起作用。代码如下。有什么提示吗??提前致谢!!

        $(document).ready(function() {
           $('#viewdonationsdialog').dialog({
             autoOpen:false,
             modal:'true',
             width:600,
             height:400,
             buttons: {
                Close: function() {
                    $( this ).dialog( "close" );
                }
             }
          });
         $('#viewdonationslink').click(openDonationsDialog);            
        });

        var openDonationsDialog = function(){
/* Including the next line causes failure.  
Removing it results in success (except, of course, that my page content isn't loaded!! */

            $('#viewdonationsdialog').load('/donationsdata');       

/* And then there's the rest... */

            $('#viewdonationsdialog').dialog('open');
            return false;
        };
4

0 回答 0