Forum Moderators: open
<style type="text/css">
body{height:100%;width:100%;}
</style>
<script type="text/javascript">
function seeSize(){
var pg_bod=document.getElementById("pgBod");
var view_ht=pg_bod.offsetHeight;
var view_wd=pg_bod.offsetWidth;
alert("height="view_ht+" & width="+view_wd)
}
</script>
<body id="pgBod" onload="seeSize();">
</body>
Note that the offset properties are well supported, but are not part of the official W3C DOM. (Many of the things that work the best, like innerHTML, are not. What does that say?)