WordPress.org

Ready to get started?Download WordPress

Forums

Advanced iFrame
[resolved] Auto reload iframe once per tab (9 posts)

  1. zarrkow
    Member
    Posted 10 months ago #

    Hello,

    we have included two iframes in two tabs on the page. Both iframes are on the same domain with relative URL's (with absolute URL's it's the same) and have different id's.

    If you click on the tabs at the same while the page is still loading, the content is displayed correctly. If you click on the tabs after the page has been loaded, nothing is displayed.

    We are looking for a solution to reload the iframes once by clicking the tabs and ask for your help.

    Thank you.

    Best regards,

    Zarko

    http://wordpress.org/plugins/advanced-iframe/

  2. mdempfle
    Member
    Plugin Author

    Posted 10 months ago #

    Do you get any Javascript error messages?

  3. zarrkow
    Member
    Posted 10 months ago #

    No, there are no error messages, just a blank page.

  4. mdempfle
    Member
    Plugin Author

    Posted 10 months ago #

    What do you mean with the content? The content of the iframe?
    Do you have an url?

  5. zarrkow
    Member
    Posted 10 months ago #

    Yes, i mean only the content of the iframe. Here's a test URL: http://www.yellowsearchtoday.eu/archive/conference-2012-hamburg-test/. The tabs with the iframes are "Sponsors" and "Proceedings".

    The shortcodes are:

    [tab id=5][heading]Sponsors[/heading]
    [advanced_iframe id="1" securitykey="xxx" src="http://www.yellowsearchtoday.eu/sponsoren/category/conference2012/" class="advanced_iframe" width="100%"]
    [/tab][tab id=6][heading]Proceedings[/heading]
    [advanced_iframe id="2" securitykey="xxx" src="http://www.yellowsearchtoday.eu/archive/login-form/" class="advanced_iframe" width="100%" onload_show_element_only=".login-form, #post-1571"][/tab][/tabs]

  6. mdempfle
    Member
    Plugin Author

    Posted 10 months ago #

    The automatic height feature seems to have a problem with the pages to include. It is maybe a problem that the elements are not shown at loading time. They have a height of 0. If I modify the height with firebug it is shown.
    Have you tried to give the iframes a fixed height and to disable the auto height?
    Which plugin do you use for the tabs?

    Best, Michael

  7. zarrkow
    Member
    Posted 10 months ago #

    You're right, it works with a fixed height, but that's actually not what we wanted. In the special case we found a better solution without using iframes, but it's good to know how to solve this problem in the future. Thank You for the great support.

  8. mdempfle
    Member
    Plugin Author

    Posted 10 months ago #

    Can you tell me which plugin you use rfor the tabs?
    Then I can try to reproduce it.

    Best, Michael

  9. zarrkow
    Member
    Posted 10 months ago #

    We don't use a plugin, but a code in the shortcodes.php of the template:

    // Tabs
    add_shortcode('tabs', 'shortcode_tabs');
    function shortcode_tabs( $atts, $content = null ) {

    $str = '<div class="tabs htabs">';
    foreach ($atts as $key => $tab) {
    $str .= '' . $tab . '';
    }
    $str .= '</div>';
    $str .= prefix_remove_wpautop(do_shortcode($content));

    return $str;

    }

    // Tab
    add_shortcode('tab', 'shortcode_tab');
    function shortcode_tab( $atts, $content = null ) {

    return '<div class="tab-content" id="tab' . $atts['id'] . '">' . prefix_remove_wpautop(do_shortcode($content)) . '</div>';

    }

    I hope that helps.

Reply

You must log in to post.

About this Plugin

About this Topic