aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to create dynamic rows and columns in HTML tables 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 "How to create dynamic rows and columns in HTML tables" Watch "How to create dynamic rows and columns in HTML tables" New topic
Author

How to create dynamic rows and columns in HTML tables

Nagaraju Mulinti
Ranch Hand

Joined: Aug 10, 2008
Posts: 37
Hi All,

I need to create rows and columns dynamically in HTML tables. I am not sure how to proceed to create dynamically. Can you please help me in this regards and also provide specific code if possible as I am not much more familiar with HTML.


Thanks in advance..!
samir singha
Greenhorn

Joined: Mar 17, 2008
Posts: 23
<TR> tag creates row in a table and </TR> ends the row in html. similarly, <TD> creates a column and </TD> ends a column. You can use two for (or any other loops) to create rows and columns dynamically. For example,

<tr>
<td>column 1</td>
<td>column2</td>
</tr>

will create 1 row and two columns. Try to implement it with loop to create as many as rows any columns you want to create dynamically.
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
If Samir's answer fulfills your request then it's good else if you want to do this on the client side, it would be a different story altogether. JavaScript would be used.


Experience and talent are independent of age
 
Don't get me started about those stupid light bulbs.
 
subject: How to create dynamic rows and columns in HTML tables