>  alert(document.viewport.getHeight());
> --------------------------------------------------------
> In FF the alert says 8, and in IE 6 & 7 I get 0.  Isn't this supposed
> to return the height of the viewable area?

To get the full height of the window, including scrollable space, I've
always used document.body.getDimensions().height or
document.body.getHeight(). If you want just the height of the viewable
area, you can use document.viewport.getDimensions().height or
document.viewport.getHeight().

http://prototypejs.org/api/document/viewport

document.body does not seem to be mentioned in the Prototype API docs,
but it is just a regular Prototype extended element so all the methods
that you can do on any other DOM element can also be done on
document.body.

-justin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to