Reputation: 11
How can I make it so that when I click on another page in an iframed it opens within the iframe? I own both the website being iframed and the site with the iframe, so if I need to do something with the configuration of either that is fine. Thanks for your time!
Upvotes: 1
Views: 1236
Reputation: 1
On the site that you are embedding the iframe on, enter this code:
<iframe src="Your iframe url" width="100%" height="100%" name="search_iframe"></iframe>
On the site within the iframe insert this code, and make sure the url is the other link you want to redirect to in the iframe:
<html><a href="Other site url" target="search_iframe">Link_name</a></html>
This should let you redirect in an iframe, but remember to add the href code for each link, otherwise it will open the link outside of the iframe.
Upvotes: -1
Reputation: 944069
That is the default behaviour.
So don't:
target
attribute on the linktarget
attribute on a <base>
elementUpvotes: 3