WordPress.org

Forums

Advanced iFrame
[resolved] More than one URL not working (14 posts)

  1. davehelmig
    Member
    Posted 1 year ago #

    Hi, I have advanced iframe setup and working great. I added my short code to a page, and have it adjusting the height automatically based on content. Works beautifully. However, I tried adding a second page, and although the iframe loads fine, the height does not automatically adjust like my first page does.

    This is strange because I copy and pasted the same short code, and only adjusted the URL.

    All URLS are on my same domain, and I tried adding iframe ID's and that didn't make a difference either. These iframes are not on the same page though, so it shouldn't matter. each one has it's own dedicated page.

    Here is the code I'm using:

    FIRST PAGE (works great!)
    [advanced_iframe securitykey="REPLACED_WITH_MY_OWN" src="http://www.angryninjas.com/new/universal" id="iframe1" name="iframe1" width="100%" height="600" onload_resize="true" resize_on_click="100"]

    SECOND PAGE (does not auto resize like the first one)
    [advanced_iframe securitykey="REPLACED_WITH_MY_OWN" src="http://www.angryninjas.com/new" id="iframe2" name="iframe2" width="100%" height="600" onload_resize="true" resize_on_click="100"]

    What am I doing wrong?

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

  2. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    http://www.angryninjas.com/new/
    does redirect to
    http://angryninjas.com/new/

    And this is a different domain where the autoheight does not work directly. I think you should remove the redirect to the non www. version.

    Best, Michael

  3. davehelmig
    Member
    Posted 1 year ago #

    Thanks, I actually had just switched the redirect last night, after i had posted this message. To see the issues now, check these URLS:

    WORKING:
    http://angryninjas.com/new/universal-studios-orlando-app/
    (clicking the "features" tab on that page will show you the size adjustment of the frame)

    NOT WORKING:
    http://angryninjas.com/new/online-app-maker/

    Both pages are using the same code, only the URL's are different. Strange that the first one works and the second doesn't. I tried deleting the second page and recreating it, same result.

    Working Page Code:
    [advanced_iframe securitykey="2ed863b63c9b8d07a93ee41eb7bc7443361ed7c9" src="http://angryninjas.com/apps/universal" id="iframe1" name="iframe1" width="105%" height="500" onload_resize="true" resize_on_click="100"]

    Non Working Page Code:
    [advanced_iframe securitykey="2ed863b63c9b8d07a93ee41eb7bc7443361ed7c9" src="http://www.angryninjas.com/appmaker/" id="iframe2" name="iframe2" width="105%" height="500" onload_resize="true" resize_on_click="100"]

  4. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    can you check if you have any Javascript errors when you include the 2nd page?

    Best, Michael

  5. davehelmig
    Member
    Posted 1 year ago #

    Not that I can find using WP_DEBUG. Here is my debug log for that page... nothing javascript related:

    `
    22-Apr-2014 15:38:37 UTC] PHP Notice: register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in /home1/angrynin/public_html/new/wp-includes/functions.php on line 3245

    [22-Apr-2014 15:38:37 UTC] PHP Deprecated: Assigning the return value of new by reference is deprecated in /home1/angrynin/public_html/new/wp-content/plugins/envato-wordpress-toolkit-master/index.php on line 204

    [22-Apr-2014 15:38:38 UTC] PHP Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( 'custom-background', $args ) instead. in /home1/angrynin/public_html/new/wp-includes/functions.php on line 3078

    [22-Apr-2014 15:38:38 UTC] PHP Notice: get_theme_data is deprecated since version 3.4! Use wp_get_theme() instead. in /home1/angrynin/public_html/new/wp-includes/functions.php on line 3078

  6. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    I mean in the browser directly. can you post the page where you include the iframes?

    Best, Michael

  7. davehelmig
    Member
    Posted 1 year ago #

    No errors that I can see in my browser. Here are the two pages where I post the iframes:

    WORKING GREAT:
    http://angryninjas.com/new/universal-studios-orlando-app/
    (clicking the "features" tab on that page will show you the size adjustment of the frame)

    NOT WORKING:
    http://angryninjas.com/new/online-app-maker/

  8. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    <iframe id="iframe2" width="105%" height="500" frameborder="1" onload=";aiResizeIframe(this, "false");" allowtransparency="true" src="http://www.angryninjas.com/appmaker/" name="iframe2">

    your url hast to be:
    http://angryninjas.com/appmaker/

    http://www.angryninjas.com/appmaker/
    and
    http://angryninjas.com/appmaker/

    are different domain.

    Best, Michael

  9. davehelmig
    Member
    Posted 1 year ago #

    Ooops, thought I changed that. Just now changed it, still the same result. Check the link again, you'll see that both are using http://angryninjas.com/appmaker/ with the same result. I deleted my cache, still not auto-sizing :(

  10. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    The error is in the page itself.
    No matter which size I use the content always is 30 px bigger.

    This is because the style of the body has heigth:100% but a padding-top: 10px and a passding bottom 20 px.
    So you will get a 100% + 30px which does always gives a scrollbar no matter how the script calculates the height

    So remove the padding from the body and put the padding to the form and you are fine...

    Best, Michael

  11. davehelmig
    Member
    Posted 1 year ago #

    Ok, thanks. I'll look into it and see if I can find which file thats in. Any idea why it would affect the second page but not the first one? Both are using the same full width page template. Or do you mean the padding is in the iframed page?

    Thanks again for all your help. LOVE the plugin!

  12. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    The first one does neither has a height of 100% nor a padding at the body.

    Best, Michael

  13. davehelmig
    Member
    Posted 1 year ago #

    Awesome, thanks again! I'll try adding a different URL for now for test purposes and that should clear it up. Thanks again for your great support.

    RESOLVED :)

  14. latexpillow
    Member
    Posted 1 year ago #

    Thanks! very helpful for me too :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic