Dynamic iFrame, Refreshing parent page on Submit

Posted on 2007-08-07
Last Modified: 2013-12-12
Hello All,

I would like to harness the power of the iFrame in my web app and need some help. This ones a bit juicy, so max points on offer.

I have a page (job_summary.php) which displays a repeated region of 'sample' numbers that require testing to be assigned. These sample numbers link to an iFrame which loads underneath. Within the iFrame is a seperate PHP page (add_testing.php) which, using $_GET, loads specific data required for the form within the page. When the form within 'add_testing.php' is submitted, it must refresh the whole page thus refreshing the sample numbers that require testing.

Any help on this is much appreciated.
Question by:MariusGM
    LVL 16

    Accepted Solution

    If the outer page needs refreshing the inner page will be unloaded anyway - you might as well have the inner page submit to the outer window:

    <form ... target="_top">


    If the refreshing of the outer page just means re-executing javascript, you should be able to attach the javascript to the onload event of the inner page:

    <iframe ... onload="refreshData()"></iframe>

    LVL 11

    Assisted Solution

    replace testFrame with the name of your iframe
    LVL 11

    Expert Comment

    Scratch that, i didnt reallize at first you want the whole page (meaning parent window as well) to be reloaded by submitting a button in iframe.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    The viewer will learn how to dynamically set the form action using jQuery.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now