Jquery ui对话框在IE7中不起作用

时间:2013-02-20 13:52:48

标签: jquery jquery-ui jquery-ui-dialog

我的对话框适用于除IE7及更低版本之外的所有浏览器 我使用的是jquery v1.8.3和jqueryui v1.9.2。

IE在.dialog()方法上引发此错误:对象不支持此属性或方法 我创建了一个测试页面,用于在IE7中产生错误:
Click Me For Test
请参阅页面来源中的任何详细信息。

编辑: 这里有一些代码:

<a href="javascript:void()" onclick="showForgPassDialog(); return false;">Show Dialog ... Click Me!</a>

function showForgPassDialog() {
    var dialog = createIframeDialog(500, 200);

    var url = '/some/page.aspx?v=' + Math.ceil(Math.random() * 9999);
    //fix error:when we back in browser, load from cach, when src set before dialog();
    dialog.find("iframe").attr('src', url);

    //hide title bar of dialog
    $(".ui-dialog-titlebar").remove();
}

function createIframeDialog(width, height) {
    return $("<div id='dialog-container'><center class='dialogLoadingProgress' style='width:250px; margin:auto; background-color:#fff; padding:20px'>loading ...</center></div>")
                .append($('<iframe id="iframe-dialog" width="100%" height="100%" frameborder="0" scrolling="no" allowTransparency="true" style="width:' + width + 'px; height:' + height + 'px"/>').addClass('iframe-opac-low'))
                .dialog({ autoOpen: true, modal: true, resizable: false, width: 'auto', height: 'auto', draggable: false });
}

0 个答案:

没有答案
相关问题