Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

resize height of iframe after ajax loaded content
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=3950
Page 1 of 1

Author:  aelite [ 6. Oct 2015, 15:09 ]
Post subject:  resize height of iframe after ajax loaded content

Hi

First of all big thanks for this plugin, it is working so great!

I have a page which displays an iframe and the iframe content height is loading using the shortcode onload_resize="true" onload="aiResizeIframe(this);"
So far this is working great.

My problem is when the iframe contains form elements.

When a user types in the form and presses submit, more content is then loaded in the iframe.
My problem is that the newly loaded content is now hidden as the iframe doesn't change its height after this content has loaded.

Is there a shortcode or setting i can use to fix this problem?

My current shortcode is [advanced_iframe securitykey="...................." src="https://mywebsite.com/page.php" onload_resize="true" onload="aiResizeIframe(this);" width="100%" height="" scrolling="no"]

I am using the external domain workaround as I am the owner of the domain.

any help would be most appreciated.

Thanks

Author:  TinyWebGallery [ 6. Oct 2015, 16:26 ]
Post subject:  Re: resize height of iframe after ajax loaded content

So it means you are on the same domain?

Look at the the resize after element resize feature.
onload="aiResizeIframe(this);" is not needed. This is done if you set onload_resize="true"
Please note that this is a feature of the pro version.

The free version also has a detection of Ajax calls but this is more complicated to setup and depends on the ajax implementation.

Best, Michael

Author:  aelite [ 6. Oct 2015, 16:50 ]
Post subject:  Re: resize height of iframe after ajax loaded content

I have purchased pro version from themeforest.

I am loading content from a sub-domain into my primary domain so technically classed as external.

Thanks

Author:  aelite [ 6. Oct 2015, 16:55 ]
Post subject:  Re: resize height of iframe after ajax loaded content

Do you have any examples of this detection of Ajax calls please.

Author:  TinyWebGallery [ 7. Oct 2015, 09:52 ]
Post subject:  Re: resize height of iframe after ajax loaded content

If the iframe is from a subdomain onload_resize="true" does not work as this is for the same domain.

See
http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/resize-on-element-resize
for an example with auto height and resize if elements dynamically change.

Best, Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/