ho fatto delle prove. descrivo la struttura:

pag1.htm
<div id='area1' height='100px'>
<iframe src='pag2' width="100%" height="100%"></iframe>
</div>


pag2.htm
<div id='area2'>
qui c'è tutta la pagina che fa crescere l'altezza
</div>
<script>
alert(parent.document.getElementById('area1').offs etHeight); // torna 100
alert(document.getElementById('area2').offsetHeigh t); // torna 400
parent.document.getElementById('area1').Height=doc ument.getElementById('area2').offsetHeight;
alert(parent.document.getElementById('area1').offs etHeight); // torna 100
</script>


con offsetHeight riesco a leggere il valore che mi interessa ma non me lo memorizza.
Dove sbaglio?