Is there any way to make an iframe act as if it were part of the page. Such as when I click a link, it either will open the links in a new tab/window by default, or have it so that when a link is clicked, it will open in the same window, but not just the iframe?
You can just set the target
attribute. To open in the current top window (top frame):
<a href="http://example.com" target="_top">Link Text</a>
Or to open in a new window:
<a href="http://example.com" target="_blank">Link Text</a>
There's also _parent
for the parent window (not necessarily the top) and _self
for the current window (the default).
Do you have control of the content that is in the iframe
?
You could use target=_top
for the links.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With