PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Iframe code in page source

  1. I have a form embedded via the widget in a sidebar. On some (very few) pages displaying a custom post type, I end up with this in the source:

    [html]
    <iframe id="gform_ajax_frame_1" name="gform_ajax_frame_1" src="about:blank" style="display:none;width:0px; height:0px;">
    <html>
    <head></head>
    <body></body>
    </html>
    </iframe>

    This is an exception, because most pages displaying the same custom post type work just fine.

    Example of problem: http://www.johnmurray-realtor.com/communities/va-aldie-creighton-farms/

    It's not something I knowingly put there by a setting. Can someone explain why it's there and what controls it? I have a separate script that I wrote that emails me when a user encounters a bad link on my site. On this page, I get an email because of the about:blank, but I don't get the email on other pages with the same sidebar widget, where the iframe code is not in the page source.

    I'm running the latest stable release of the GF, 1.5.2.8.

    Thanks in advance.

    Posted 12 years ago on Saturday September 17, 2011 | Permalink
  2. Anyone have any thoughts?

    Posted 12 years ago on Tuesday September 20, 2011 | Permalink
  3. The iframe is present whenever you embed a form using AJAX submission. If you're having a problem, I think the iframe in the source is a red herring. It should be there whenever you embed a form and enable AJAX submission.

    That source definitely looks weird and my guess is that it's a plugin conflict processing the content twice or something.

    You can test this by disabling the AJAX for the forms in question and see if things work properly.

    Posted 12 years ago on Wednesday September 21, 2011 | Permalink
  4. Chris, thanks for the reply. Yes, disabling Ajax did eliminate the iframe code. I take it the src of about:blank is required for the iframe? For some reason, that triggered a 404 error, but I had other pages with the same form (and Ajax enabled) that were viewed and didn't trigger an error. Perhaps a user tried to submit the form with Ajax enabled. At any rate, with Ajax disabled, the iframe code is not in the source.

    Posted 12 years ago on Wednesday September 21, 2011 | Permalink
  5. It's triggering a 404 error because whatever code you are using to check for this is treating that as an actual link and is trying to go to it, when it's not a link. It's part of the AJAX iframe. With AJAX disabled this doesn't happen because it's part of the AJAX functionality.

    Posted 12 years ago on Wednesday September 21, 2011 | Permalink

This topic has been resolved and has been closed to new replies.