By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,481 Members | 1,211 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,481 IT Pros & Developers. It's quick & easy.

Javascript resize works in IE not FF

P: n/a
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>

Jun 29 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

<eo*********@gmail.com> wrote in message
news:11*********************@x69g2000cwx.googlegro ups.com...
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>

Jun 30 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.