Hyperlink not opening in Iframe, instead opens in new tab
I have some hyperlinks on a left panel sidebar. On clicking any of them,
the respective page should open in an iframe present on the right. Now,
this is working fine for most of the links. But for some links and
unfortunately, the links i need to use, it opens correctly in the iframe
only for the first time of page load. After that, it keeps opening in a
new tab.
The console says "Unsafe JavaScript attempt to access frame with URL1 from
frame with URL2. Domains, protocols and ports don't match." But this
appears even in the cases when the links open up correctly in the iframe.
I am completely puzzled as to why this is happening. Help me out.
<a href= "some url" target="iframe_P"> </a>
<iframe src="random url" name="iframe_P" scrolling="auto"></iframe>
Also I have tried using id = "iframe_P". Doesn't work either.
No comments:
Post a Comment