How to force link from iframe to be opened in the parent window
I found the best solution was to use the base tag. Add the following to the head of the page in the iframe:
<base target="_parent">
This will load all links on the page in the parent window. If you want your links to load in a new window, use:
<base target="_blank">
Browser Support
What causes an iframe to open new links inside parent window?
<a href="http://en.wikipedia.org" target="_top">Top</a>
<a href="http://en.wikipedia.org" target="_self">Self</a>
The magic of target
: http://jsfiddle.net/DerekL/wxcufehg/
Related Topics
Webgl - Wait for Texture to Load
HTML5 Input Type=Number Removes Leading Zero
Difference Between Classes and Ids in CSS? Explain with Example of Where to Use
How to Convert an HTML Table to Csv
Stop Lastpass Filling Out a Form
Block Level Element Vs Block Formatting Context
Google Maps Height 100% of Div Parent
Slant The Top of a Div Using CSS Without Skewing Text
Display: Inline-Block Does Not Make Width as Small as Possible with Wrapped Contents
R Shiny Selectedinput Inside Renderdatatable Cells
Is Any Way That Is Safe to Display Videos in a Browser
Send Form by Email and Track Responses in Spreadsheet
Img's Max-Height Not Respecting Parent's Dimensions
Schema.Org/Microdata Markup for List of Recent Posts Without Providing "Author"/"Publisher"
Display Text on Mouseover for Image in HTML