现在的位置: 首页 > 综合 > 正文

【原】Iframe with SimpleModal keeps breaking down in IE 9 IE 7

2012年03月15日 ⁄ 综合 ⁄ 共 992字 ⁄ 字号 评论关闭

SimpleModal 插件 

http://www.ericmmartin.com/projects/simplemodal/

 

以下代码可以避免在IE中使用simpleModal弹出iframe出错问题

 var license_no = ''

$(document).ready(function () {
    $('#quote').click(function (e) {
        license_no = $(this).attr("licenseNo");
        e.preventDefault();
        function setSrc() {
            $('#frame_content').attr("src", "/default.asp?UrlReferrer=coxIpro&license_no=" + license_no);                    
        }
        $.modal('<iframe src="" id="frame_content" style="overflow:auto" scrolling="yes" frameborder="0" height="550px" width="805px">', {
            onShow: function (dialog) {
                setSrc();
            },
            // Fix width issue in IE 7
            containerCss: {
                height: 560,
                padding: 0,
                width: 810
            },
            overlayClose: true,
            persist: false
        });
    });
});

 

抱歉!评论已关闭.