使用ASP.net回发的Jquery Dialog

时间:2012-04-24 11:30:29

标签: jquery asp.net css iframe postback

我喜欢使用带有外部URL链接的对话框模式,并且允许在不关闭对话框的情况下保存对话框内部。我不确定这是最好的方法,但至少当按钮保存对话框模态不关闭时。因此,为了让我在模态弹出窗口中点击保存按钮而不关闭对话框,我与Iframe一起使用,但有2个问题:

  1. 如果没有//dialog.load(url);
  2. 运行,则css会有所不同
  3. iframe无法自动调整大小。
  4. 所以任何人都有解决方案吗?

    $('.popupEdit').click(function () {
        var url = this.href;
    
    
        var dialog = $('<div id="pEdit"><iframe id="iframedit" src="' + url + '" style="width:1200px;height:490px;"  frameborder="0" ></iframe></div>').appendTo('body');
        //var dialog = $('<iframe src="' + url + '" style="width:1200px;height:490px;"></iframe>').appendTo('body');
        //dialog.load(url);
        dialog.dialog({
            autoResize: true,
            height: 'auto',
            width: 'auto',
            modal: true,
            position: 'center',
            draggable: true,
            open: function (type, data) { $(this).parent().appendTo("form"); },
            close: function (type, data) { $("[id$=btnSearch]").click(); }
       });
    

1 个答案:

答案 0 :(得分:0)

可能这个替代方案可以满足您的要求:

您可以在http://www.scriptiny.com/2009/05/javascript-popup-box/使用TinyBox弹出窗口 使用Iframe选项。

具有您提到的相同功能......

相关问题