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')));
});
精彩评论