Home | Forms | Redirect iFrame Forms

Redirect iFrame Forms

Do you have a form embedded on your site as an iFrame? Does that form redirect within that iFrame, but you would rather it redirect the entire page? We discovered a way to do this!

Within the designer for your form (or survey or subscription page) open the Confirmation Text and place the URL you would like to redirect to in the Post Redirect field.

Now, on the page you are redirecting to, place this script in the header:

<script language="JavaScript" type="text/javascript">

if (self != top) {




The script will force this page to open in its own window every time someone navigates to it. That does mean that if there is anywhere else that you want this page to open in an iFrame, you should not use this method.


Written by Allison Macedo, Product Manager at ClickDimensions

2017-05-16T18:06:54+00:00 By |Forms|7 Comments

About the Author:

Allison Macedo is the Product Manager at ClickDimensions.


  1. MeganWalkerUK August 26, 2015 at 8:40 am - Reply

    Hi Allison, I cheered slightly when I found this. Have been trying to do this all day. However, even using the script in the header of my destination page, it still loads in the iframe. Do I need to make any changes to the iframe code on the landing page with the form?

  2. ClickDimensions August 28, 2015 at 4:12 pm - Reply

    Hi Megan,
    That should be all you need to do. Can you submit a support ticket at http://support.clickdimensions.com? Include the link to this blog post you are referring to and also your webpage where the form resides and we’ll take a look at it.

  3. Ron Watt October 6, 2016 at 1:45 am - Reply

    I found that using the widget option does a cleaner redirect, directly to the new page.
    Essential for smoother UX and better tracking in Google Analytic and Adwords.

    If you can access, see http://support.clickdimensions.com/hc/en-us/community/posts/220094967-Improved-support-for-redirect-from-iFrame-to-a-full-page-url

  4. Merissa January 10, 2018 at 3:02 pm - Reply

    Hello. We’re embedding the form within Sitecore and therefore have no ability to add the above into the header section. Are there any other alternatives apart from using widgets?


  5. Brandon August 17, 2018 at 1:35 pm - Reply

    This did not work for me… followed everything perfectly.

Leave A Comment