473,388 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Javascript resize works in IE not FF

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
1 1557
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Put 030516 in email subj to get thru | last post by:
I've always been bothered about having to statically declare the size of a Java applet window (container?) in the calling HTML. I've always wanted the moral equivalent of width=50% statement (of...
9
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with...
3
by: mindseeker | last post by:
I have a html window that is opened from another link with the toolbars etc off. i have javascript code to detect the users screen size, which then the newly opened window uses to resize to full...
1
by: den2005 | last post by:
Hi everybody, I am confused and still looking why this codes is not working. Can anyone notice or know why this code is not working? Thanks in advance. Code working: <form id="form1"...
1
by: jadeite100 | last post by:
Hi: I am using IE 6 SP2. My resize attribute does not work <body onresize="test1();">. When I resize my window, the resize event doesnot get call. I have a jsp page with an iFrame called...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.