File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Finding total lenght of DIV Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Finding total lenght of DIV" Watch "Finding total lenght of DIV" New topic
Author

Finding total lenght of DIV

Rizwan Mohammad
Ranch Hand

Joined: Sep 02, 2005
Posts: 445
Hi,
I would like to know the total scrollable area available in my <div> using java script. How do i do that?
The followign code gives only the lenght of div tag area(say 100px)

But there can be more content inside div with scorllbar appearance..say 300px(not sure how much) of content...How do i know the total content lenght.
This i need to know so that I can set the scrollbar to the bottom(as this is my requirement).. Right now I have set the highest value to work..

Is this the way to code? or Is there way to know the exact height of scrollable div area?


Rizwan
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://radio.javaranch.com/pascarello/2005/12/14/1134573598403.html

Eric
Rizwan Mohammad
Ranch Hand

Joined: Sep 02, 2005
Posts: 445
This works great. Thanks Eric.
 
wood burning stoves
 
subject: Finding total lenght of DIV