Jump to content

Redirect page from iFrame


Web Weenie

Recommended Posts

I have an external html page that shows in an iFrame. I want to reload the parent page after 3 seconds. I've tried refresh meta tag and a javascript timer but everything loads in the iFrame. How do I direct to the parent window? All I want is to force the parent window to refresh.

Link to comment
Share on other sites

Have you looked into perhaps using AJAX instead of iframes?

Link to comment
Share on other sites

Have you looked into perhaps using AJAX instead of iframes?
Well I actually use ajax to load the page into the iFrame. I didn't want to get into the gory details but... I load an external html into an iFrame. This page has a link on it and clicking downloads a file. That page is replaced with a message stating the download is in progress. Now I want that message page to display for 3 seconds and then reload the complete parent page. How do I jump out of the iFrame and reload a html page?Thought this would be simple, but can find anything on the interwebs...
Link to comment
Share on other sites

I just stumbled on the answer...I've been using parent.location.href = somePage. It dawned on me the the parent for that page is another page in the iFrame... so I tried a hail marry approach parent.parent.location.href = isomePage and it works!Thanks anyway.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...