aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript Add a Row 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 "JavaScript Add a Row" Watch "JavaScript Add a Row" New topic
Author

JavaScript Add a Row

bofeibous smith
Greenhorn

Joined: Jul 26, 2010
Posts: 5
How would I script the following to allow me to dynamically add a row vs a static value so the end user can click on a plus icon to add a row vs showing them all. The following is set statically for 8 rows. This is only for one (host) section. There are about 10.


Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Please UseCodeTags when posting code. It will increase the chances of you getting help.


GenRocket - Experts at Building Test Data
bofeibous smith
Greenhorn

Joined: Jul 26, 2010
Posts: 5
My apologies .... updated.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And this is why I detest PHP.

In any case: which JavaScript library are you using?
bofeibous smith
Greenhorn

Joined: Jul 26, 2010
Posts: 5
Any, just trying to find a easy solution.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

David Newton wrote:In any case: which JavaScript library are you using?
bofeibous smith
Greenhorn

Joined: Jul 26, 2010
Posts: 5
MooTools, jQuery
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

I think if the question is how to write Javascript to modify some HTML, it would be a good idea if we saw the HTML in question. Seeing some code which generates that HTML isn't nearly as useful.
bofeibous smith
Greenhorn

Joined: Jul 26, 2010
Posts: 5
HTML Output

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Lol, with a touch of irritation: why make it difficult for people to help you?

Anyway:

$('#myTable > tbody:last').append('<tr>...</tr>');
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaScript Add a Row