Notifications
Clear all

Load ai_external.js delayed on external page, breaks resize  


Posts: 2
(@magys)
New Member
Joined: 2 weeks ago

Hello

I'm using Advanced iframe pro and most of the resizing with postMessage is working fine.
Because of some limitation with the used framework of the external site, I should load the ai_external.js delayed after the initial site is loaded in the iframe. As soon as I remove the ai_external.js from the body and load it delayed with jQuery.getScript the functionality is breaking and no postMessages are logged in the console and resizing is no longer working.

Is there are chance to get the plugin working in such a scenario? 

Thanks
Magys

 

3 Replies
TinyWebGallery
Posts: 185
Admin
(@admin)
Administrator
Joined: 12 years ago

Hi,

the ai_external.js has a

aiAddOnloadEvent method.

If you load this delayed then the onload event is already fired when the script is initialized.

If if you like to do this you have to change this method to execute

aiExecuteWorkaround_advanced_iframe();

directly.

Best, Michael

Reply
1 Reply
(@magys)
Joined: 2 weeks ago

New Member
Posts: 2

@admin Works perfectly, thank you very much! 🙂

Reply
TinyWebGallery
Posts: 185
Admin
(@admin)
Administrator
Joined: 12 years ago

You are welcome ;).

Reply