This week's book giveaway is in the Testing forum.
We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line!
See this thread for details.
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
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Inserting HTML into a table dynamically" Watch "Inserting HTML into a table dynamically" New topic
Author

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?
Thanks,
Corey


SCJP Tipline, etc.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
use innerHTML not innerTEXT
 
 
subject: Inserting HTML into a table dynamically
 
Threads others viewed
how to delete multiple browse
Help me to have a sortable table in my html profile!
dynamic table in java script
adding and deleting a row in html
Adding a row to a HTML table on-the-fly
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture