[resolved] Need Help w/ iframe and TARGET _parent (3 posts)

  1. beesquarevas
    Posted 6 years ago #

    Hi All,

    I am having an issue using an iframe for a CoffeeCup Form Builder form. I am already using a plugin - Secure and Accessible PHP Contact Form v.2.0 - for my basic contact form, but needed a more extensive form to use as a training program application so I turned to CoffeeCup. I have no issue getting it onto my site using iframe.

    My site: http://cornerstonecoachacademy.com/life-coaching-training-program-application/

    My code:

    <iframe src="http://cornerstonecoachacademy.com/application.html" name="Life Coach Training Program Application" scrolling="auto" frameborder="no" align="center" height = "2850px" width = "850px">

    Now my issue (and I have gone to the CC forums and have had not even had a bite as to the answer) is that once you hit submit it takes you to the Thank you page within the iframe. Not what I want to do.

    The code within the two files that call unto that Thank you page are...

    The myform.php:

    * The page to redirect to after the form is submitted.
    define('CC_FB_RESULTS_REDIRECT', 'http://cornerstonecoachacademy.com/thank-you-for-your-application/');


    The myform.xml:


    What I would like to do is have the new page, the Thank You page, open up in the outer frame, instead of within the iframe. I am assuming I would want to do a target="_parent" but am unsure how to do this or if I can do within the php, which is where I assume the call needs to be made. (A programmer I am not, so excuse anything obviously newbie here)

    Can you add a target to the php? I do not want to have my page open within the inner frame.

  2. beesquarevas
    Posted 6 years ago #

    help please?

  3. beesquarevas
    Posted 6 years ago #

    I received help on another forum. It was suggested using the following within the thank you page code...

    <script type="text/javascript">
    if (window != window.top) window.top.location.href = window.location.href;

    I tried it and it worked. I hope this can help someone else who may face the same challenge.

Topic Closed

This topic has been closed to new replies.

About this Topic