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 Dynamically increasing DIV size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dynamically increasing DIV size" Watch "Dynamically increasing DIV size" New topic
Author

Dynamically increasing DIV size

Reshmi Kuttappan
Greenhorn

Joined: May 26, 2009
Posts: 17
hi,

am having difficulty while implementing DIV tags in my HTML.

Scenario is as follows:
1: am having a table with 19 columns, having 2 rows for header fields <th> & 2 rows for data fields <td>
2: have used a Div tag with following properties to show all columns using a scrollbar.
<div style=" width:932px; height:125px; overflow:auto;" id="divAcc">
3: i have a function on click of which am populating the 2 rows of data fields <td>. (Note: Every time the button is clicked point 3 must happen. User can click the button 'n' number of times)

Now the problem arised here:
1: On button click am able to populate 2 rows of data, but since my DIV size is not getting increased all values appear on the scroll bar.

Please help me to dynamically increase my DIV height.

Thanks,
Reshmi
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Because you have the div set to scroll, you add rows to the bottom of the table and it will appear hidden.

Add the rows to the top or scroll the div down to where you just added the rows.



Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamically increasing DIV size