aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Appending new table to existing table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Appending new table to existing table" Watch "Appending new table to existing table" New topic
Author

Appending new table to existing table

Girish Kumar Prabhakar
Ranch Hand

Joined: Dec 09, 2008
Posts: 34
Hi All,

I have a table which have one row and one column. Inside this i have a second table(inner table).
I want to add a new table to this existing table through javascript.
My code is working for Mozilla FF but not for IE.

Can someone please tell me whats wrong in this code.



Thanks in advance.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
When you are doing maintable.appendChild(mytable) you are basically creating markup that would look something like this



I bet that is not what you are after.

Eric
Girish Kumar Prabhakar
Ranch Hand

Joined: Dec 09, 2008
Posts: 34
Hi Eric,

Yes, i am not looking for this.

what i want is i have a main table. Inside thid main table there is already one table.(for eg innertable1).
I want to add a new table( for eg innertable2) to main table.

Something like this :

<maintable>
<innertable1> //which is already there.
<innertable2> // the one created dynamically.
</maintable>

Hope i am able to explain properly.

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
well you would have to add a new row to the main table and add it or append it to the same cell the inner table is in.

Eric
Girish Kumar Prabhakar
Ranch Hand

Joined: Dec 09, 2008
Posts: 34
Thanks a lot Eric.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Appending new table to existing table