I want to have a textbox in my HTML page, and also an iframe. When the user types in a URL in the textbox and clicks Submit, the iframe navigates to that page. When the user clicks a link within the iframe, the URL in the textbox also changes to the new URL. Is it possible?
NOTE: Solutions not using iframe are welcome, but they should achieve roughly the same functionality as iframe.
Give your text box a id for example “txtInput”
give your iframe a id for example “myIframe”
on the button give it no navigation so it stays on current page and use the onclick=”myFunction()”
in the function you can use this (excuse me if this is slightly wrong its been a while since I have used HTML
If you do not want to mess with regular expresions you can just simply use the following.