Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how high is a page?

Reply
Thread Tools

how high is a page?

 
 
Merlin
Guest
Posts: n/a
 
      07-06-2004
Hi there,

I am wondering if there is a solution with JS to find out how high a page is.
How many pixels. Depending on how much content is on each dynamic site, I would
like to place other content on another row.

Thank you for any hint,

Merlin

 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      07-06-2004
In article <>,
enlightened us with...
> Hi there,
>
> I am wondering if there is a solution with JS to find out how high a page is.
> How many pixels. Depending on how much content is on each dynamic site, I would
> like to place other content on another row.
>



Wow. All your users have the same screen resolution? Neat.



[You should really use percents, not pixels. Good coding negates the
need to do this sort of check at all.]

--
--
~kaeli~
A lot of money is tainted - It taint yours and it taint mine.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

 
Reply With Quote
 
 
 
 
Java script Dude
Guest
Posts: n/a
 
      07-07-2004
> I am wondering if there is a solution with JS to find out how high a page is.
> How many pixels. Depending on how much content is on each dynamic site, I would
> like to place other content on another row.


There is a way to do this but it is highly innacurate. If you use
padding styles anywhere within the range you are measuring, those
padding distances are ignored. As such, you can only use margins when
working needing to get a more accurate measurement of the rendered
height or width of a DOM Elem.

To get the height of an object `o` use o.offsetHeight, for the width
use o.offsetWidth. For measuring the window size, in IE use
document.body.clientHeight & document.body.clientWidth in Moz use
window.innerHeight & window.innerWidth.

I know these properties work with IE and Moz but have not tested on
anything other browsers.

Good luck!

JsD
 
Reply With Quote
 
Mike Foster
Guest
Posts: n/a
 
      07-07-2004
Merlin wrote:

> I am wondering if there is a solution with JS to find out how high a page is.
> How many pixels. Depending on how much content is on each dynamic site, I would
> like to place other content on another row.


Try the following page with different browsers. Perhaps it will be helpful.
<URL: http://cross-browser.com/x/test/clientheight.html>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
High Def Brings High Sales Hopes. Allan DVD Video 59 08-08-2005 06:03 PM
Looking for high-end 18- or 19-inch flat panels with high resolution. KL234 Digital Photography 6 02-26-2004 08:18 PM
USB High Speed against USB Non High Speed DannyD1355 Computer Support 1 09-07-2003 02:59 AM



Advertisments