WordPress.org

Ready to get started?Download WordPress

Forums

Advanced iFrame
[resolved] With two advanced_iframes on one page, hiding elements in both is impossible (4 posts)

  1. MarkusSchulte
    Member
    Posted 1 year ago #

    Hi,

    in my case I am having two advanced_iframes on one page[1]. In both iframes, I want to hide elements via iframe_hide_elements="". This is not possible, as there is one fixed name for the generated javascript-function "aiModifyIframe()".

    I fixed this by appending the id of the actual advanced_iframe to the js-function-name (Diff is for advanced_iframe v. 3.2; "advanced-iframe.php" is my modified version):
    diff advanced-iframe.php advanced-iframe.php.orig
    335c335
    < $html .= 'function aiModifyIframe' . esc_html($id) . '() { ';
    ---
    > $html .= 'function aiModifyIframe() { ';
    370c370
    < $onload_str .= ';aiModifyIframe' . esc_html($id) . '();';
    ---
    > $onload_str .= ';aiModifyIframe();';

    [1] http://www.bestellbaer.de/

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

  2. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks.

    The same problem would occur with aiModifyParent() and aiResizeIframeHeight()

    I will also add the id there in the next version.

    Best, Michael

  3. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    Please note that if you have 2 instances the cookie and the extra space would also interfere!

  4. MarkusSchulte
    Member
    Posted 1 year ago #

    ack & ty.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.