• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to create dynamic rows and columns in HTML tables

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..!
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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.
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic