Fancybox with an iframe cross-domain, partially re

2019-09-17 16:25发布

问题:

Site that open a fancybox iframe, and in the i-frame there is a aspx - ajax page of other domain. just with IE10 in compatibility mode (No problem with others browsers), the page is just partially rendered, and when I click on a button (example to change the color of the bag) the page is correctly rendered.

First rendered:

After click on orange color:

UPDATE:

1) On a separate iframe (without fancybox) the page works perfectly.

2) It's not a cross-domain issue, problem exists also on my pc.

回答1:

Try disabling iframe preload like

$(".fancybox").fancybox({
    width: 800, // or whatever
    height: 570,
    type: 'iframe',
    // solve issues with iframes and IE
    iframe : {
        preload: false
    }
});


回答2:

Ok, it was a jQuery version problem. In the main web page, the version is 1.9.1 In the i-frame, I use the 1.4.4 version (due to an old plug-in used in the page) I upgrade version in the i-frame to 1.9.1 and the problem disappear. Thanks to everybody!