Forum Moderators: open
i've created the following simple javascript functio to calculate the clients screen height:
function getHeight() {
y = window.screen.availHeight;
res = y+"px";
//alert(res);
return res;
}
how can i pass this value to the table height attribute so that the table fills the entire screen vertically under every resolution
any help is much appreciated!
grtz kristof
try this, it may give you some ideas...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224">
<html>
<head>
<title>full size table</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
<!--
function getHeight() {
document.getElementById('tbl').style.height=document.body.offsetHeight+'px';
document.getElementById('tbl').style.width='700px';
}
//-->
</script>
<style type="text/css">
<!--
html,body {
height:100%;
margin:0px;
padding:0px;
}
#tbl {
border:2px solid #f66;
margin:auto;
}
#tbl td {
border:1px solid #933;
text-align:center;
}
-->
</style>
</head>
<body>
<table id="tbl"><tr>
<td onclick="getHeight()">click here</td>
</tr></table>
</body>
</html>
birdbrain