aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Adding cells to Table one at a Time Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Adding cells to Table one at a Time" Watch "Adding cells to Table one at a Time" New topic
Author

Adding cells to Table one at a Time

Joe Brigs
Ranch Hand

Joined: Jun 06, 2011
Posts: 52

I have a empty Table to start , the user can click button to add one cell at a time. Each row can contain 6 cells if more is needed I add another row. My problem is whats the correct way to add a cell to an existing row ? I'm sure this is simple but , my head hurts. Thanks for any help

Joe Brigs
Ranch Hand

Joined: Jun 06, 2011
Posts: 52

I'm sure everyone knows, but this is a function I call when button is clicked.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
https://developer.mozilla.org/En/DOM/Node.appendChild

Eric
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

This is the sort of thing that jQuery excels at. I'd highly recommend using jQuery whenever you are doing any of: event handling, Ajax, or DOM manipulation.



[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Joe Brigs
Ranch Hand

Joined: Jun 06, 2011
Posts: 52

Eric , Thanks for the help that did the trick. Bear I will start reading about jquery and ajax soon. and Then I have to find out if I can use those in the shop I work in. Thanks again
 
 
subject: Adding cells to Table one at a Time
 
Threads others viewed
Highlighting a row in a table
using OGNL
Help me to have a sortable table in my html profile!
Inserting HTML into a table dynamically
In struts, How to solve this with Database and jsp?
developer file tools

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