Would that be... (but you’ll have to trade http://www.google.com
because it will not load inside the Iframe.). I was able to find a Google URL that works inside Iframe, just so you can check how it works.
$("body").on("click", "a", function(e) {
var target = $(this).attr("target");
if (target == '_blank') {
$("#meuIFrame").attr('src', $(this).attr("href"));
return false;
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div>
<a href="http://www.google.com/custom?q=&btnG=Search" target="_blank">Google</a>
</div>
<iframe id="meuIFrame" src="" style="width: 200px; height: 200px;"></iframe>
Such as the URL http://google.com
does not work, any URL whose response contains the header X-Frame-Options: SAMEORIGIN
also will not open inside Iframe, unless you have how to put this HTML in the same source as the URL.
These iframes are in the same domain?
– Sergio