Appear div to close just after clicking iframe

3

It is possible to have a div with a iframe and only after the user clicks on one of the links within iframe , would appear a div to say fechar and when the user clicked there, it closed to div fechar and div that contained iframe ?

    
asked by anonymous 03.02.2015 / 19:35

2 answers

3

Normally I do this (without the use of iframe), maybe it's interesting for you. link

And now it changed to use an iFrame: link

    
04.02.2015 / 00:10
2

Yes, the @thecreator is possible. For this you can use jQuery. I think this tutorial can help you. See also this answer that deals with the same issue.

Update It would be something like this:

document.getElementById( 'frame' ).addEventListener( 'click', function( event ){
    $("#Mensagem").show();
})

Inside the DIV message you will have a link or button that closes the div that contains the frame.

    
03.02.2015 / 21:11