This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding Tables Dynamically

 
Arulanand Dayalan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an 'Add User' button when the user click it,details of user will be fetched using ajax call.I have a Table inside which i need to show fetched details from Ajax call. The problem is details is get is so much i need to have an seperate table for each user.I dont know how to add tables dynamically. Can any one help me how to add rows dynamically.

<Table>--This is static
<tr>
<td>

<Table>-Firs time on Add user
<TR>
<TD>D1</TD><TD>D2</TD><TD>D3</TD><TD>D4</TD>
</TR>
<TR>
<TD>D5</TD><TD>D6</TD><TD>D7</TD><TD>D8</TD>
</TR>
<Table>-Second time on Add user
<TR>
<TD>D1</TD><TD>D2</TD><TD>D3</TD><TD>D4</TD>
</TR>
<TR>
<TD>D5</TD><TD>D6</TD><TD>D7</TD><TD>D8</TD>
</TR>

</Table>
This grows on when the add user button is clicked
</td>
</tr>

</Table>

Regards,
Arul.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look into document.createElement() and insertRow() and insertCell()

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic