Re: Javascript resize works in IE not FF



Take a look at the Yahoo UI library -- it's got good cross-browser methods
for determining the size of the viewport.

Docs here: http://developer.yahoo.com/yui/dom/
Source here: http://sourceforge.net/projects/yui



<eoin.haluch@xxxxxxxxx> wrote in message
news:1151591312.527804.60160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm using javascript to set div sizes dependant on the size of the
window, it works in IE6 < but not IE 7 of FF. Any ideas?

<script language="JavaScript" type="text/javascript">
function getPageHeight() {
var myFooter =(document.body.scrollHeight > document.body.clientHeight)
? document.body.scrollHeight : document.body.clientHeight;
document.getElementById("sidebar").style.height = myFooter-175;
}
getPageHeight();
</script>



.