aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Adding Tables Dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Adding Tables Dynamically" Watch "Adding Tables Dynamically" New topic
Author

Adding Tables Dynamically

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
look into document.createElement() and insertRow() and insertCell()

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding Tables Dynamically