开发者

jQuery .load() in UI .dialog() calling a specific DIV not working in IE, fine in FF, Safari, Chrome

开发者 https://www.devze.com 2023-01-31 16:36 出处:网络
I\'ve got a ColdFusion page with jQuery UI dialog that opens when a link is clicked and looks for some specific stuff on the page being loaded. In IE, all I get is a blank dialog window.

I've got a ColdFusion page with jQuery UI dialog that opens when a link is clicked and looks for some specific stuff on the page being loaded. In IE, all I get is a blank dialog window.

$('#pop').dialog({
    autoOpen: false,
    modal: true,
    width: 700,
    height: 600
});

$('.info').click(function(e) {
    var ref = $(this开发者_StackOverflow社区).attr('href');
    var theTitle = $(this).attr('title');
    e.preventDefault();
    $('#pop').dialog('open');
    $('#pop').load(ref + '#columnText h1, #columnText img, #columnText h2, #columnText p, #columnText a');
    $("span.ui-dialog-title").text(theTitle);
});

Works in FF/Safari/Chrome but no go in IE. I tried adding some math.random to the call to break the IE cache but still no luck.

If I load the entire page, it works in IE but then in Safari it pops open the dialog window then tries to navigate to the page in the HREF.

Anybody see some blatant errors I need to be attending to?

Here's the link that initiates the call:

<a class="info" href="municipal_park_bench.cfm" title="EBBR Series Park Benches EVCOR, LLC.">Details&hellip;</a>


Just add a space in your load selector:
$('#pop').load(ref + ' #columnText h1, ...


What does Firebug or a network monitor tool tell you? Also, I notice you are filtering the response to a specific jquery selector. Try removing that. In theory it means your dialog will show more than you want, but it will be simplified.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号