Clear all

(external workaround) Only able to insert java code in body of iframe content page - not header  

Posts: 1
New Member
Joined: 3 weeks ago

Excellent work with this plugin.  I need to dynamically resize the iframe as the content is on an external domain's page and uses java to resize the content on the page.  So its not reloading a new page, but rather modifying the content.  I don't think the General Advanced Feature Scroll the parent will work, and am hoping to use the external workaround to do this.  I have limited access to the external (iframe's content) page.  I can add the call to the ai_external.js script however it can only be inserted in the body, not the header.  Is there a workaround for this?

1 Reply
Posts: 212
Joined: 12 years ago

"Scroll the parent" has nothing to do with auto height. 

Not sure who told you that you should insert the ai_external.js to the header. 

This is written in the documentation: Add the following Javascript to the external web page you want to show in the iframe (The optimal place is before the </body> if possible. Otherwise put it in the head section. NEVER place it just after the <body> as than the height of the script element would be measured!):

so placing it into the body is fine if it is not the first element. IF it is the first element and you have no other option you can still define the "element to measure".

Please read as I think if your content is resized by Javascript (not Java :)) you also need the "resize on element resize" feature. 

Best regards,