Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load more than one (1) iFrame. Container DIV is assigned duplicate ID #18

Open
JamoCA opened this issue Oct 9, 2013 · 2 comments

Comments

@JamoCA
Copy link

JamoCA commented Oct 9, 2013

In version 1.2.4, if multiple iframes are accessed, frame_1 aborts processing as soon as frame_2 starts processing. If I delay the start of frame_3 using setTimeout, it will also load and not impact the other frame, but it's not a viable or promising workaround.

$('#frame_1').iframeHeight();
$('#frame_2').iframeHeight();
setTimeout(function(){
    $('#frame_3').iframeHeight();
},1000); 

Regarding the container DIV's non-unique IDs (when called multiple times), I changed it to this:

var divID = base.$el.attr('id') + '-iframeHeight-Container';
base.$el.before("<div id='"+ divID +"' style='padding:0; margin:0; border:none; background-color:transparent;'></div>");
base.$el.appendTo("#" + divID);
base.$container = $("#" + divID);
@Sly777
Copy link
Owner

Sly777 commented Oct 9, 2013

Hi @JamoCA,

The big problem is "$.iframeHeight.resizeIframe" function because it is used from everywhere of plugin. If i change this, plugin cannot work from external (or crossdomain pages). So i must update the structure of plugin. It means it can be really big changes. Im sorry but I tried some things after emails but nothing changed. So i added this todo list.

@zhiru
Copy link

zhiru commented Feb 26, 2014

I don't know if is the same problem, but to load multiple iframes add after "base.init();", this:
uuid++;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants