I want relative links inside an iframe
to be relative to the URL in the address bar, not relative to the iframe
's URL. Is this possible?
Modern browser support is all I need.
As an example:
Address bar in browser shows http://www.example.com/a/b.html
. Inside that webpage is an iframe
with a src
of http://othersite.com/12x982h/index.html
. Within that html, there's a link to test.html
. When you click on that link, the browser should load a new page at http://www.example.com/a/test.html
.
UPDATE: I don't have control over the iframe
's content.
I assume you have control over the iframes content. If my assumptions is correct then that means you can set a "base path" using the <base> tag. All relative URLs will then be "based" on the path you define therein.
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