File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide 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

Adding Tables Dynamically

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124

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

<Table>-Firs time on Add user
<Table>-Second time on Add user

This grows on when the add user button is clicked


Eric Pascarello

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

It is sorta covered in the JavaRanch Style Guide.
subject: Adding Tables Dynamically
It's not a secret anymore!