I'm trying to make a table fit into a window, it works well in IE, but doesn't work at all in Firefox. Here's my code:
function adjustHeight() {
var contsheight = document.documentElement.clientHeight;
conts.height=contsheight // conts is the table ID
}
and in the body tag:
<body background="../bggradient.jpg" onload="javascript:adjustHeight();" onresize="javascript:adjustHeight();">
my table's tag looks like this:
<table width="100%" border="0" cellpadding="0" cellspacing="0" ID="conts"">
IE does the job just fine, while Firefox doesn't do a thing. Debugging has taught me that firefox does know the "document.documentElement.clientHeight"-variable, and Firefox' Javascript Console says: "conts is not declared". I've also tried the getObjectByID function but that didn't help either.
It's not my first compatibility issue, but this time I don't know what to do with it. Anyone else know how to deal with this problem?
function adjustHeight() {
var contsheight = document.documentElement.clientHeight;
conts.height=contsheight // conts is the table ID
}
and in the body tag:
<body background="../bggradient.jpg" onload="javascript:adjustHeight();" onresize="javascript:adjustHeight();">
my table's tag looks like this:
<table width="100%" border="0" cellpadding="0" cellspacing="0" ID="conts"">
IE does the job just fine, while Firefox doesn't do a thing. Debugging has taught me that firefox does know the "document.documentElement.clientHeight"-variable, and Firefox' Javascript Console says: "conts is not declared". I've also tried the getObjectByID function but that didn't help either.
It's not my first compatibility issue, but this time I don't know what to do with it. Anyone else know how to deal with this problem?








