Salve a tutti,
ho un iframe all'interno di una pagina che carica a sua volta un menu dinamico che varia sempre sulla sua altezza.Il tutto e contenuto all'interno di una cella di una tabella.
Adesso vorrei far in modo di ridimensionare l'altezza di quest'ultima in base all'altezza che viene impostata automaticamente dall'iframe quando esso viene caricato.
Vi mostro un test di quello che sto facendo per aiutarvi a capire:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript">
window.onload=function(){
var hh=document.getElementById('menu').style.height;
document.getElementById('home').height=hh;
}
</script>
</head>
<body>
<table width="100%" height="80" border="0" cellpadding="0" cellspacing="0" id="home">
<tr>
<td height="100%" valign="top"> <iframe name=menu frameborder=0 width="230" src="menu.asp" height="100%"></iframe> </td>
</tr>
<tr>
<td height="20">[img]img/line.jpg[/img]</td>
</tr>
</table>
</body>
</html>
tramite questo script
codice:
<script language="javascript">
window.onload=function(){
var hh=document.getElementById('menu').style.height;
document.getElementById('home').height=hh;
}
</script>
sto cercando di recuperare le informazioni che mi servono per poter ridimensionare la mia cella, e sebra che avendo il valore "100%" impostato nel mio iframe, la mia variabile recupera sempre un valore nullo.
Avete qualche suggerimento?