Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Internet Explorer中的jQuery UI对话框和maxHeight_Javascript_Jquery_Jquery Ui_Jquery Dialog_Css - Fatal编程技术网

Javascript Internet Explorer中的jQuery UI对话框和maxHeight

Javascript Internet Explorer中的jQuery UI对话框和maxHeight,javascript,jquery,jquery-ui,jquery-dialog,css,Javascript,Jquery,Jquery Ui,Jquery Dialog,Css,以下是我当前的代码: $("#DialogScroll").dialog({ bgiframe: true, autoOpen: false, maxHeight: 600, width: 550, modal: true, resizable: false, open: f

以下是我当前的代码:

$("#DialogScroll").dialog({
                bgiframe: true,
                autoOpen: false,
                maxHeight: 600,
                width: 550,
                modal: true,
                resizable: false,
                open: function (type, data) {
                    $(this).parent().appendTo("form");
                },
                close: function () { }
            });
maxHeight在Firefox、Chrome等浏览器中运行良好,正如预期的那样,但IE7显然存在一个问题。有人知道如何让UI对话框在IE中使用maxHeight吗

<div id="DialogScroll" class="dialog" style="display:none; ">
        <table>
            <thead>
                <tr>
                    <th>
                        State Code
                    </th>
                    <th>
                        State Name
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Literal ID="litStates" runat="server" />
            </tbody>
        </table>
    </div>

州代码
州名

看起来这是一个长期存在的问题-在这个链接上,有一个变通方法和一个补丁列在评论中。

Dean指向的链接最近有一个更新,其中有一个非常适合我的变通方法:

此外,您还可以通过“vol7ron”应用自己的CSS;比如:

因此,在你的情况下:

$("#DialogScroll").dialog({
    bgiframe: true,
    autoOpen: false,
    width: 550,
    modal: true,
    resizable: false,
    open: function (type, data) {
        $(this).parent().appendTo("form");
    },
    close: function () { }
}).css( { 'max-height' : '600px'} );

到底是什么问题?(我假设它可以大于它的最大高度,但我想确保。)您也可以粘贴#DialogScroll以便我们可以在这里看到它吗?谢谢。添加了对话框的内容。现在的情况是,maxHeight设置为600,空白全部消失,这很好,但我可以实际设置表(它是jQuery datatables插件的一部分)以显示更多记录。比如说50。超过IE中的最大高度。
$("#DialogScroll").dialog({
    bgiframe: true,
    autoOpen: false,
    width: 550,
    modal: true,
    resizable: false,
    open: function (type, data) {
        $(this).parent().appendTo("form");
    },
    close: function () { }
}).css( { 'max-height' : '600px'} );