I think what you want is not the height of body, but client height. try: document.documentElement.clientHeight;
On Wed, May 6, 2009 at 12:09 AM, kimbaudi <kimba...@gmail.com> wrote: > > Hi, I am unable to get the height of the <body> tag using > Element.getDimensions although I can get the width of the <body> tag > fine. How can I get the height of the <body> tag? I have my simple > code pasted at http://pastie.org/468828. Here is the snippet of code > below as well: > > function alertBodyDim() { > /* $('main') refers to <body id="main"> */ > var dimensions = $('main').getDimensions(); > alert(dimensions.width); > alert(dimensions.height); > } > > - Paul K > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---