Notifications
Clear all

Load ai_external.js delayed on external page, breaks resize

4 Posts
2 Users
1 Reactions
16.6 K Views
Posts: 2
Topic starter
(@magys)
New Member
Joined: 4 years 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: 923
Admin
(@admin)
Prominent Member
Joined: 16 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: 4 years ago

New Member
Posts: 2

@admin Works perfectly, thank you very much! 🙂

Reply
TinyWebGallery
Posts: 923
Admin
(@admin)
Prominent Member
Joined: 16 years ago

You are welcome ;).

Reply