nella pagina che contiene iframe: (nome e id uguali a mainframs)
<script type="text/javascript" language="JavaScript">
<!--
function ridif()
{
if(top.frames['mainFrame'].document.height){
altiframe = top.frames['mainFrame'].document.height;
}
else if(top.frames['mainFrame'].document.body.scrollHeight){
altiframe = top.frames['mainFrame'].document.body.scrollHeight;
}
else if(top.frames['mainFrame'].document.offsetHeight){
altiframe = window.frames['mainFrame'].document.offsetHeight;
}
if(document.getElementById){
document.getElementById('mainFrame').style.height = altiframe + 40 + "px";
}
else if(document.all){
document.all['mainFrame'].style.height = altiframe + 40 + "px";
}
}
//-->
</script>
nelle pagine che devono aprirsi nell'iframe prima del tag </body>
<script type="text/javascript" language="javascript">
<!--
top.ridif();
document.onload=top.ridif();
// -->
</script>