IE的jQuery UI对话问题 [英] jQuery UI Dialog Issue With IE

查看:93
本文介绍了IE的jQuery UI对话问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用新的jQuery 1.3.2和jQuery-ui-1.7库以及UI Dialog。我有一个div标签,里面有几个表单元素(文本框,复选框等)。在页面加载时,jQuery将div显示为对话框。这在FF中工作得非常好,但在IE中,div的高度是错误的。它只是显示标题栏的一些内容。我在创建div时明确设置了高度。如果在打开对话框后设置高度选项,则会更正高度,但内容为空(显示文本框的前三分之一)。如果我允许对话框可以调整大小,如果你在IE中调整它的大小它工作正常,但我不想强迫IE用户调整大小只是为了看到内容。有任何想法吗?以下是我用来创建对话框的代码:

I am using the new jQuery 1.3.2 and jQuery-ui-1.7 libraries along with the UI Dialog. I have a div tag with several form elements (textbox, checkbox, etc.) in it. Upon page load, jQuery shows the div as a dialog. This works absolutely fine in FF, but in IE, the height of the div is wrong. It is just showing the title bar a bit of the content. I explicitly set the height when creating the div. If I set the height option after opening the dialog, the height is corrected, but the content is blank (shows the top third of a textbox). If I allow the dialog to be resizable, if you resize it in IE it works fine, but I don't want to force IE users to resize just to see the contents. Any ideas? Here is the code I use to create the dialog:

$('#dialogDiv').dialog({ 
    bgiframe: true, 
    height: 400, 
    width: 620, 
    modal: true, 
    draggable: true, 
    resizable: false, 
    close: function(event, ui) {
        if($('#agree').val() != '1')
            location.href = 'somepage.html';
    }
});


推荐答案

我已经回答了我自己的问题。我只需要使用对话框的高度属性和对话框中的一些元素。好的打电话给我!

I have answered my own question. I just had to play with the height properties of dialog and some of the elements within the dialog. Good call me!

这篇关于IE的jQuery UI对话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆