• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding total lenght of DIV

 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works great. Thanks Eric.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic