views:

276

answers:

2

Hi, I have an iFrame that does some background processing. When this processing is complete I would like to re-direct the user to another page, but the header change code is only affecting the embedded iFrame. Is there a way to target the main window?

+1  A: 

Use JavaScript to track content of frame, if content change, redirect browser :)

canni
how do I go about checking if the iFrame has changed? I thought onchange wouldn't work unless it's a form
Daniel Hanly
Heare You have reference on how to retrieve content of frame, You can do an loop to check every peroid of time, if something has changed http://roneiv.wordpress.com/2008/01/18/get-the-content-of-an-iframe-in-javascript-crossbrowser-solution-for-both-ie-and-firefox/
canni
+1  A: 

I have seen the deprecated Meta redirect have a target attribute, but I don't know how widely it is supported.

In Javascript:

top.location.href = "resultpage.htm";

Works only if the top frame is on the same domain as the emitting page.

For a solution that works across domains and without Javascript, the following would work:

<a href="resultpage.htm" target="_top">Continue</a>
Pekka