WordPress.org

Forums

Advanced iFrame
[resolved] Chrome instability (7 posts)

  1. Eric Fuentes
    Member
    Posted 11 months ago #

    I'm not sure what is going on, but I'm running into some instability with the cross domain auto height adjuster. Seems to be working fine on Firefox and IE, but Chrome is sporadic.

    When the page loads, the iframe looks good, but then will drop down to 4px high. I've checked my css and I intentionally removed the height vailue so I could set inline or with the plug-in. But I somehow keep getting a 4px value initially with Chrome. I can't get the script in the <Head> at the moment, so I placed it in the <Header> and <Footer> of each page for the time being. Below is a link to my page, let me know if you need any further details.

    http://flavoredthreads.com/custom-shop

    Thanks,
    Eric

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

  2. mdempfle
    Member
    Plugin Author

    Posted 11 months ago #

    You have included the ai_external.js twice. Please fix this first because the script has global variables which can cause problems. Also you have i included jquery a couple of times...

    If you still have the problem than you should define a timeout for the resize. Because if the external page has some Javascript that hides the page at the beginning the measured height is 0 px (4px is a small safety buffer needed for ie).

    Best, Michael

  3. Eric Fuentes
    Member
    Posted 11 months ago #

    Here's what I pasted in from the plugin instructions.

    <script src="http://flavoredthreads.com/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>

    Here's what was generated once the script ran.

    <script src="http://flavoredthreads.com/wp-includes/js/jquery/jquery.js"></script>
    
    <iframe id="ai_hidden_iframe_advanced_iframe" style="display:none;" src="http://flavoredthreads.com/wp-content/plugins/advanced-iframe/js/iframe_height.html?height=4&id=advanced_iframe" height="0" width="0">Iframes not supported.</iframe>

    All together, this is what you see:

    <script src="http://flavoredthreads.com/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
    
    <script src="http://flavoredthreads.com/wp-includes/js/jquery/jquery.js"></script>
    
    <iframe id="ai_hidden_iframe_advanced_iframe" style="display:none;" src="http://flavoredthreads.com/wp-content/plugins/advanced-iframe/js/iframe_height.html?height=4&id=advanced_iframe" height="0" width="0">Iframes not supported.</iframe>

    Which do I need to delete?

  4. mdempfle
    Member
    Plugin Author

    Posted 11 months ago #

    Now it looks o.k. Have you modified something?
    And for me it looks much better in chrome already.

    If you still have a problem you can delay the resize a little bit. check the instructions how you set his variable.
    You can set this with e.g.:
    var onload_resize_delay = 100;

    Best, Michael

  5. Eric Fuentes
    Member
    Posted 11 months ago #

    Yes, I had the snippet placed in the header and footer section of the site, just to see which would work. I removed the snippet from the header and left the footer. Seems to be working now, thank you.

    So, my next task is to make the iframe responsive. I have some css I was going to try and use, but not sure if that would work better then the settings in the plugin. Would you be able to help me with that? Thanks in advance.

    Eric

  6. Eric Fuentes
    Member
    Posted 11 months ago #

    Thank you.

  7. mdempfle
    Member
    Plugin Author

    Posted 11 months ago #

Reply

You must log in to post.

About this Plugin

About this Topic