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 Inserting HTML into a table dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Inserting HTML into a table dynamically" Watch "Inserting HTML into a table dynamically" New topic

Inserting HTML into a table dynamically

Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
I was using some DHTML to change a table through JavaScript and all was going well until...
I'm inserting a new row into my table and one of the cells of the inserted row should contain a button. Here's the code I'm using:

The problem is that, instead of displaying a button in that cell, I see the HTML markup for a button. Is there anyway to get it to dislpay the button, rather than the input tag that I used to create the button?

SCJP Tipline, etc.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
use innerHTML not innerTEXT
I agree. Here's the link:
subject: Inserting HTML into a table dynamically
It's not a secret anymore!