Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    JavaScript


Reload/refresh Parent Web Page From An Iframe

My main browser page has an iframe. Whenever the iframe is reloaded
(updated), I want to automatically refresh the main webpage as well.
How can this be done, preferably using javascript?

View 2 Replies (Posted: November 5th, 2006)

Sponsored Links:

Related Forum Messages For JavaScript category:
C# - Window.parent.location.reload(true) - Parent Page Will Refresh And Display The Updated Info
I have a aspx page that pops up a new window to edit some info. When the user is done editing they click save and at the end of the save event I have this C# code:

Context.Response.Write("<script type='text/javascript'>window.parent.location.reload(true);window.frameElement.commitPopup();</script>");

So that the parent page will refresh and display the updated info. My problem is that if I have done some other action on the previous page that caused a postback, the code above will try to redo that postback (attempting to delete an item for instance). Is there some way that I can update my information on the parent page without redoing the last postback?

Posted: Jun 23 11 at 23:47

View 1 Replies!   View Related
Best Possible Way Of Forcing IFrame Page To Reload As Parent?
<iframe src="iWantToBeTheParent.html" />

I think this is a JavaScript task, it would be nice to handle the redirection with htaccess though since my code will inside an iframe I'm looking for a method that initiates from inside the iframe source which would make the iframe url load as the parent. I only have access to the iframe source page's html. Would it be possible to send a 301 HTTP redirect as well? I could use php to print out the url of the iframe page as a JavaScript variable if needed.

Posted: Aug 24 10 at 15:35

View 1 Replies!   View Related
Jquery :: Scroll Parent Page With IFrame Reload?
I have a page with a long iframe on it, which loads a schedule display with pages of various lengths. When a new page is displayed in the iframe though, the main page is often still showing the bottom of the page (lots of whitespace). How can I have the main page scroll to the top anytime a new page is loaded in the iframe?

This is the page

I've tried this is jQuery (on the parent page):

<script type="text/javascript">
jQuery(document).ready(function() {
$('#body iframe').load(function(){


Posted: Nov 8 10 at 2:09

View 1 Replies!   View Related
Refresh Iframe Parent Page After Submit In Iframe?
i have iframe inside a page, and this iframe contain a submit button which will do some function.What i want is: after the iframe submit finish, call the parent page to refresh.

Posted: Dec 7 09 at 15:25

View 4 Replies!   View Related
IFrame On Unload Refresh Parent Page?
I have an iframe in a page. When the iframe is closed I would like to refresh the parent page. Checking out the iframe element w3 page I see there are no standard events.I considered a polling approach, having the parent page constantly check if the frame is created, and then checking if it is removed and then refreshing, however this approach isn't great.

I can imagine sometimes delays between iframe close and page reload if the polling is to infrequent.With a more frequent polling the page would impact "user experience" (jerkiness).I'm wondering if there is another approach that does not involve iframe parent communications.

Posted: Oct 6 10 at 10:02

View 1 Replies!   View Related
Jquery :: Refresh Div On Parent Page From Iframe?
I'm using fancybox's modal box with an iFrame. On form success from the iFrame I'm using the code below:

<script type="text/javascript">
window.setTimeout(' = "/page.asp"; ',999);
<script language="javascript">


How do I make a function on the parent page to refresh the div id="target" and call it from the iFrame. Right now, the entire parent page refreshes.

Posted: May 27 11 at 17:27

View 2 Replies!   View Related
Forms - Refresh Parent Page After Closing Iframe Modal Box?
I have a webpage where a user can 'add an article'; when they click to 'add an article' it opens an iframe (a pop-up modal box).In the Iframe there is a form with 'save' and 'cancel' buttons - what I'm trying to do is make it so when the user hits 'save', it will close the modal box, and then refresh the page.I have it set so the iframe closes and the data is saved to the database, but I can't get the page to refresh (which would then display the new article) Here is the code for the button:

<a class="toolbar" href="#" onclick="javascript: submitbutton('save'); return false;">

Here is the end of the javascript function that handles the saving of the data:

function submitbutton(pressbutton) {
<?php endif; ?>
submitform( pressbutton );


Posted: Feb 21 11 at 16:25

View 4 Replies!   View Related
Display URL Of Iframe And Refresh Upon Reload?
I am having trouble with a script that displays the url of an iframe. On this page, I have a single iframe and want to display the url of the iframe in a div. It works upon initial loading, but the url does not change when a link within the iframe is clicked and a new iframe page loads within the frame. My users need the ability to determine and directly link/view the iframe url.

Here is the script
<iframe id="mainFrame" name="mainFrame" class="inner-center" frameborder="0" scrolling="auto" width="100%" height="400"


what to research and implement. Can you reload the content in the div? do I want to look at cross-frame scripting?

Posted: 05-15-2009, 11:07 PM

View 3 Replies!   View Related
Refresh Parent From IFrame Makes Refresh Loop In FF Only?
I have this code in a page that appears in my iframe if requested from parent:

<script type="text/javascript">
The parent code is:
function rrr() {

So, the person clicks a link from the parent, it does a php process in a hidden iframe, which then tells the parent page to refresh. The only problem is that it puts Firefox in a constant loop of refreshing. IE and Chrome work fine. They refresh once and stop.

Though the src code opens the iframe like so: <iframe src="" style="display:none; height:1px;" name="hdplus" id="hdplus"></iframe> Firefox seems to refresh the page with the memory of the child page being in the iframe, constantly looping the child request to refresh the parent.

Why won't Firefox just accept that no page should load in the iframe, as stated in the code? I need to stop this loop, which means I need to get firefox to reset the iframe as it reloads the page.

Posted: Jan 2, 2009

View 2 Replies!   View Related
Jquery :: Reload Parent Window When New Window Refresh Or Reload?
im not sure if can explain this well, im new to jquery, It goes something like this, I have a parent window and in the parent window there's a link button and when the link button was clicked a modal popup will appear and in the modal popup there's a button, when i click the button a new window will open and the popup window will close, my exact requirement is that, when the new window refresh or reload thats the time the parent window will also reload or refresh. They said this is possible in jquery.

Posted: May 6 at 7:14

View 1 Replies!   View Related
Stop Iframe Refresh / Reload Loop When Using Onload
I Found the solution! credit goes entirely to the assistance I received from Mixel. For those who find themselves in the same predicament of needing to pull a div from an iframe without using onload.

Posted: Nov 4 at 14:53

View 1 Replies!   View Related
JQuery :: Reload An Iframe - Doesn’t Show The Change Until Refresh
I have two iframes on a page and one makes changes to the other but the other iframe doesnt show the change until i refresh there an easy way to refresh this iframe with jQuery

<div class="project">
<iframe id="currentElement" class="myframe" name="myframe" src=""></iframe>

Posted: Nov 22 10 at 20:15

View 7 Replies!   View Related
Jquery :: Reload Parent Window From Within An Iframe
I have my login page in an iframe and wished to reload the parent window using ajax and jquery from within iframe without refreshing but i'm getting errors like this this[0].ownerDocument || this[0]).createDocumentFragment is not a function

Posted: Mar 18 11 at 11:31

View 2 Replies!   View Related
Refresh Iframe's Parent From Within Iframe In Https?
I have a page A and inside it I have an iframe B. B points to another php file that shows a form (so basically in the iframe we see a form). When I submit the form, I call to another page C that verifies the fields of the form and if they are ok I redirect to page X, if not I redirect to page Y. The problem is that I see page X and Y inside the iframe, and I want to see them in the parent page.

Posted: 08-11-2011, 05:13 PM

View 1 Replies!   View Related
How To Refresh Parent Iframe
Normally this would be pretty straight forward, but I've tried a bunch of examples and none of them work.

I am attempting to refresh a menu I have in an iframe. I will explain. I have a index.php page with 3 iframes in it (this is the parent). The top frame is for the site logo, the left frame is the menu (I call it menuframe) and the frame beside that is for the page content (contentframe).

I have the menu with various options, when the user logs in it should refresh and show some addition options (logout, admin area, etc).

The login page appears in the contentframe, once the user logins I want the menuframe to refresh to list these new admin options. I know my php session is working fine because if I manually refresh the menuframe it shows the items.


Posted: 12-08-2011, 06:31 AM

View 2 Replies!   View Related
Iframe Refresh From Parent Window?
Alright I have an Iframe, and at the end of that Iframe I have set a variable with JS to be equal to TRUE, indicating that the page has run through the script. I then check that the iframe from the parent window for that variable, if it has not been set yet (or does not equal true) it reloads the iframe.

The code works fine FF and Opera. However in IE it does not reload the frame if it is not true, and in Chrome it alerts undefined and does not reload the frame I have tried accessing the frame through the dom and it did not work for me, and i have also tried simply adding a tail to the iframes source with no success. :confused:


Posted: 03-17-2011, 10:41 PM

View 2 Replies!   View Related
Reloading Parent If Iframe Does Not Refresh?
I have an html script that contains an iFrame.

The partent contains a display header and the iFrame contains rows of data, the iFrame is set to refesh every 20 seconds.

There are times for whatever reason the iFrame does not refresh. Is there a way I can have some sort of timer in the parent that reload the set if the iFrame has not refreshed after 20 seconds.

Posted: 10-16-2011, 11:05 AM

View 2 Replies!   View Related
Refresh Content In The Page And Update The URL Without Doing A Full Page Reload?
I thought that JavaScript didn't allow you to update the browser's URL (for bookmarking, etc) without doing a full page refresh. Facebook seems to accomplish this in their photos application, though. When I click "next" to see the next photo, the new photo loads and the URL updates, but the whole page doesn't refresh.

Posted: Oct 5 09 at 16:55

View 1 Replies!   View Related
Reload The Page Without A Hard Refresh?
When I use document.location.reload() it seems to reload all the images and the css file and it's slow.

I want to reload the page and change the anchor in the url. But when I do document.location = "" No reload happens because it's already on that url.

Is there any way to reload the current page and change the #anchor without forcing the reload of the images/css?

Posted: 06-05-2011, 05:55 PM

View 2 Replies!   View Related
Refresh - Reload The Page As GET Request
I have a seemingly simple question, but can't find the answer. I have a webpage, which may have resulted from a POST request and may have an anchor (#) in the URL. I want to reload this page as a GET request in JavaScript. So it's similar to this question, but I actually want to avoid the POST, not just the warning about it. So, for example, if the page resulted from a POST request to [URL] I want to reload the URL [URL] as a GET. If I try window.location.reload(true); that causes IE to try a POST. If I instead do:

window.location = window.location.href; this does nothing when the URL has an anchor. Do I really need to do string manipulation myself to get rid of the "#whatever" or is there an easier, "better" way to do this?

Posted: Aug 4 09 at 1:08

View 1 Replies!   View Related
JQuery :: Refresh / Reload Page Once?
how to refresh/reload a page (or even specific div) once(!) using jQuery? Ideally in a way right after the "DOM structure" is available (cf. "onload" event) and not negatively affecting "back button" or "bookmark" functionalities. note: ''replace('' is not allowed due to third-party restrictions.

Posted: Apr 1 10 at 0:47

View 3 Replies!   View Related
Capture The Refresh Inside Of An Iframe From Parent Document?
We have a file upload page. We didn't want to reload the page once the upload is done, so we put the form inside of an iframe. The form inside of an iframe posts to itself and returns json when it's done. How can we capture that response? When upload is done, the iframe reloads, so in other words, how do we capture when the iframe is reloaded?

we cannot print/return anything except the json object (so no js code to call the function in a parent document.) we cannot use ajax since you cannot post files using ajaxwe cannot append javascript code inside of iframe, because once the form inside of iframe is submitted, the page gets reloaded and we lose the appended js code.

UPDATE - Seems like the solution is super simple (found it somewhere online):

<iframe onload="alert(window['upload_iframe'].document.body.innerHTML);" ...></iframe>

This way, it will fire the alert whenever page inside of an iframe is reloaded. Now it's just matter of differentiating JSON object from HTML code, which is pretty simple.

Posted: Oct 30 11 at 0:02

View 2 Replies!   View Related
Iframe Change Its Parent's URL Fragment (without Causing A Refresh)?
I'm trying to get a child JavaScript application to update it's parent document. In essence, this is a very simple problem: a JavaScript program opens an iframe in it's own document. another JavaScript program is loaded into the iframe. the second program needs to change the fragment (anchor) in the original page. the first program, then "goes" to the new fragment (the document position is updated, but the document is not refreshed). In an endless number of web pages there are descriptions of how to do this, using tricks like:


Posted: Jun 26 09 at 13:59

View 2 Replies!   View Related
Server Trip Without A Page Refresh Or Reload Possible ?
i would like to have a link, such that when the user clicks on it, a script is fired to go to server and check for page updates, if any, it should request a reload, else stay silend (terminate)

is such thing possible?

Posted: July 23rd, 2005

View 4 Replies!   View Related
Copyright © 2005-08, All rights reserved