Dynamic iFrame, Refreshing parent page on Submit

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.
Who is Participating?
LeeKowalkowskiConnect With a Mentor Commented:
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>

AlexanderRConnect With a Mentor Enterprise Web DeveloperCommented:
replace testFrame with the name of your iframe
AlexanderREnterprise Web DeveloperCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.