This week's book giveaway is in the Testing forum.
We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Scrollbar using Div Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Scrollbar using Div " Watch "Scrollbar using Div " New topic
Author

Scrollbar using Div

Anu Jv
Greenhorn

Joined: Apr 02, 2003
Posts: 14
Hi,
I have created a scrollbar for a table using <div> tag with style
div.mytbl
{
height:104px;
width: 100%;
padding-right: 1px;
overflow: auto;
}
New rows are added to table dynamically and at that time the scrollbar gets generated.
I want to get whether the scrollbar has appeared or not using a call in my method similar to getting div height
alert(document.getElementById("MYDIV").style.height);
Thx
Anusha
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
What you are looking for is:
document.getElementById("theDiv").scrollHeight
Eric
Anu Jv
Greenhorn

Joined: Apr 02, 2003
Posts: 14
Yes exactly. But Mozilla does not support. Is there any other option?
Thx
Anu
 
 
subject: Scrollbar using Div
 
Threads others viewed
how to get scrollbar events
DIV tag for vertical scrollbar causing blank space at the top of the DIV
Table with Scrollbar
problem with ui:repeat or h:datatable or ice:datatable
Creating CSS class at runtime
IntelliJ Java IDE