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) {

parent.location.href=self.location.href;

}

</script>

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.

Powered by WPeMatico