You are here: irt.org | FAQ | DHTML | Q1135 [ previous next ]
Try:
<script language="JavaScript"><!-- function update() { if (document.all) document.all('myLayer').innerHTML = 'some text'; else if (document.layers) { document.layers['myLayer'].document.open(); document.layers['myLayer'].document.writeln('some text'); document.layers['myLayer'].document.close(); } } function size() { if (document.layers) alert('height = ' + document.layers['myLayer'].document.height); else if (document.all) alert('height = ' + document.all['myLayer'].offsetHeight); } //--></script> <div id="myLayer" style="position:absolute; height:0" height="0"></div> <br><br><br> <form> <input type="button" value="Update" onClick="update()"> <input type="button" value="Size?" onClick="size()"> </form>