Si possono far caricare le pagine via JavaScript all' iframe, anziché da Link A HREF TARGET; e dunque stabilire delle associazioni del tipo:

URL1 | height="a" all' iframe

URL2 | height="b" all' iframe

assegnando tali Valori congiuntamente all' iframe con stringhe di esecuzione del tipo:

document.getElementById("idIframe").src = "URL2";

document.getElementById("idIframe").height = "b";

Se poi però all' interno di quelle pagine ci sono a loro volta dei link, questo allora prospetta una faccenda diversa; sono pagine tue o di altri siti che ci fai apparire ?
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>URL based IFRAME Sizer</title>

<script type="text/javascript">
    
function change(content, h){

 document.getElementById("viewer").src    = content;
 document.getElementById("viewer").height = h;

 }

</script>

</head>
<body bgcolor="#404040">

<div align="center">
            



<input value=" html.it " type="button" onclick='change("http://www.html.it/",   "400");'>
<input value="google.it" type="button" onclick='change("http://www.google.it/", "260");'>



<iframe id="viewer" frameborder="1" width="50%" height="" scrolling="" src=""></iframe>


</div>

</body>
</html>