html - How to force link from iframe to be opened in the parent window -


I need to open the link in the same original page rather than opening it in a new page.

Note: iframe and guardian pages are the same domain .

I found the best solution to use the base tag. Add the following to the top of the page in the iframe:

  & lt; Base target = "_ parent" & gt;  

This will load all the links on the page in the original window. If you want to load your link in a new window, use it:

  & lt; Base target = "_ blank" & gt;  

This tag is in all browsers.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -