Ready to get started?Download WordPress


Advanced iFrame
[resolved] Variable height (7 posts)

  1. lwall
    Posted 9 months ago #

    Hi Michael,

    I am making great progress with embedding only part of a non-related website using the show-part parameters.

    My only remaining problem is that the non-related domain changes the height of the frame depending on the results of a search.

    The search form has a height of 390, the maximum height it uses is 1130 when it shows more than 20 results, but then, the last page of results is impossible to guess, there are multiple heights depending how many results are shown (i.e. one height if it shows two more results, another height if it shows ten more results).

    I am using next_viewports and it works fine between form and first page of results, but then if the user clicks to see the last page the frame shows too much, or too little.

    Here is my advanced_iframe code.

    [advanced_iframe securitykey="..." src="http://www.ibba.org/resources/directory" id="iframe_ibba_form" name="iframe_ibba_form" show_part_of_iframe="true" show_part_of_iframe_x="160" show_part_of_iframe_y="5" show_part_of_iframe_width="755" scrolling="no" show_part_of_iframe_do_update="true" show_part_of_iframe_next_viewports="5,160,755,975" show_part_of_iframe_new_url="http://www.ibba.org/resources/directory?option=com_msd&view=searchs" height="1130" show_part_of_iframe_height="390"]

    Any help, ideas, creativity, alternative solutions, etc. will be greatly appreciated.


  2. mdempfle
    Plugin Author

    Posted 9 months ago #

    I assume that the page you want to include the page is not http://www.ibba.org

    So the parent does only get an event that the remote page has changed but nothing else. So it is impossible to know if the page there is smaller.
    Can you edit the html of this page? Than you could use the resize workaround.

    Best, Michael

  3. lwall
    Posted 9 months ago #

    Thanks for your reply, Michael.

    Correct, I want to include part of http://www.ibba.org into my own website which is in a different domain.

    Correct, the parent has no way to know the remote page has change its size.

    I have total control over the parent but no control whatsoever over the remote.

    Which page you refer to when you say "Can you edit the html of this page?", the parent or the remote?

  4. lwall
    Posted 9 months ago #


    A quick update. I have started to use http://www.ibba.org/resources/directory#ja-current-content and seems to position the iframe easier. Meaning I do not need to work the x and y initial positions.

    Question: The css of the iframe has outflow set to hidden (overflow: hidden;), where can I change that? When I turn it off, the iframe self-adjusts its height.

    #ai-div-advanced_iframe {
    height: 394px;
    overflow: hidden;
    position: relative;
    width: 755px;}

    #advanced_iframe {
    left: -1px;
    position: absolute;
    top: 0;
    width: 100%;}

  5. mdempfle
    Plugin Author

    Posted 9 months ago #

    you have to change this in the code directly because the css is generated dynamically.

    Best, Michael

  6. lwall
    Posted 9 months ago #


    Which file should I modify? I am looking at the css file and don't see anything like "#ai-div-advanced_iframe".

    Please, advise.


  7. mdempfle
    Plugin Author

    Posted 9 months ago #

    This is all created dynamically in the advanced-iframe.php because the id needs to be included to the css to enable several iframes on one page.

    But if you don't need to show a part of the iframe anymore you simply don't have to use this feature. removing the overflow does only show the whole iframe.
    But I think the height is than not self adjusting. It shows than the height you give in the config.

    Best, Michael


You must log in to post.

About this Plugin

About this Topic