Reset parent window with i-frame

PMD / 2011-10-26 13:03:45   

Hey there,

I've been implementing i-frames within my site with great success thus far. I have reached a point where I'm running into a slight roadblock.

The situation: I'd like the parent page to reset when a link within the i-frame is clicked. Currently, my site loads within the site over and over again. Here is a link to show this in action.

http://www.philipdibello.com/index.php?/ongoing/news/

(Clicking the source reloads the page)

I'd like to know if there is a way to reset the page when a link is clicked, so my main website does not render within the i-frame, it just refreshes the entire window / tab.

Possible?

Thank you in advance, I appreciate all the hard work done by the community and the great platform.

Vaska A / 2011-10-26 13:28:50   

I don't really understand what you are trying to do...but I believe the answer is 'no'.

You can do this with alot of javascript and something very custom, but otherwise you are relying upon the natural way the browser functions.

PMD / 2011-10-26 18:06:59   

Hey Vaska,

Thanks for replying, I really appreciate it. I'll do some research and if I come up with anything will post a solution.

Best,
Phil

Zegnat / 2011-10-31 12:30:35   

You can use the following attribute/value pair on any anchor (A) element that needs to open in the top window instead of inside the frame:

  1. target="_top"

Do note that ‘target’ has already been deprecated in HTML4.01 and has been completely phased out in HTML5. While it does work, your pages might not validate any more. (If you care for such a thing.) You can read more about it in the SitePoint HTML Reference.

This thread has been closed, thank you.