i need to open the link in the same parent page, instead of open it in a new page.
note : The iframe and parent page are the same domain.
i need to open the link in the same parent page, instead of open it in a new page.
note : The iframe and parent page are the same domain.
Use target-attribute:
<a target="_parent" href="http://url.org">link</a>
As noted, you could use a target attribute, but it was technically deprecated in XHTML. That leaves you with using javascript, usually something like parent.window.location
.
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" />