开发者

Lightbox iFrame problem

I have an iFrame that is loaded with a lightbox. The problem I am having is 开发者_JAVA百科this. I want the parent page to redirect to a different page after a link in the lightbox pop up is clicked. Does this make sense? Please help. Thank you in advance.


The only way is to define a javascript function in your parent frame to be called in your child frame.

eg in your parent frame if your using jQuery :

function redirectFromFrame(link){
    window.location.href = link;
}

and in your lighbox frame you should have something like this.

$(function() {
    $('a').click(parent.redirectFromFrame($(this).attr('href')));
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜