开发者

iframe links not opening in frame

开发者 https://www.devze.com 2023-03-06 08:30 出处:网络
The links under the portfolio section of my website open in a new window rather than the iframe. They all worked properly until recently but then and abruptly stopped, and I have not changed the code.

The links under the portfolio section of my website open in a new window rather than the iframe. They all worked properly until recently but then and abruptly stopped, and I have not changed the code. I have closely checked the code and tried different variations, but there i开发者_运维知识库s no apparent reason it would not work. I am really stumped and I would greatly appreciate any help! The website is www.risanicole.com so you can check the source code. Thank you!


I ran into the same issue with a 3rd party component and ended up using jQuery to get the behavior I wanted. If that is an option, you can do something like this:

$(document).ready(
    function () {
        $("a").attr("target", "_parent"); 
    });


I came across the same issue. I think what should work is giving target of hyperlink as the name of iframe instead of id (in case you are doing that) or else you should not write any "src" attribute of the targeted iframe.

0

精彩评论

暂无评论...
验证码 换一张
取 消