Execute Form Submission Actions from Iframe to Parent Page

February 2, 2015 | by

We have seen a few cases where users use iframe forms and want to direct visitors that filled in the form to a thank you page or PDF, video, etc.

The problem is that since the form is embedded on a landing page which is different from the parent one, the action happens only on the inner page where the form is.

To solve that, below are 2 Javascript tags we created. Insert in as an HTML element to your iframe pages or directly to the landing page template you use for iframes. Place it before the last </body> tag.

The first tag will perform the action on the parent page and the second tag will open it in a new tab.

Form Action on a Parent Page

Form Action in a New Tab