I wish to make a link or button in a page that changes the page the iframe is on. It would be a local page:
idreesinc.com/iframe.html
and you can see what I have already here:
idreesinc.com/research
Help would be much appreciated as i have been looking for an answer for ages. Thanks!
You can embed an iframe in a page that is inside another iframe on another web page. When you set the target attribute to _parent, the link will open in the web page that is holding the iframe. In most situations with iframes, this target will open links in the same way that the _parent target does.
In HTML, a button link to another page can be by using the <a> tag, <input> tag, and the <form> tag. A link on a button is get by href=”” attribute of <a> tag. The “type=button” and “onclick=link” attributes are used to create a link on the button.
You can simply make an link with its target to the iframe name as follows:
<iframe name="demo" src="example.php"></iframe>
Your link in the parent will be:
<a href="newpage.html" target="demo">Change Link</a>
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