Hi everybody; I know maybe this is basic stuff; but I'm in the middle of something with it.
The question is that I need to add a row to an existing table, with four cells and in each cell I need to add different input types, In fact they are: One select, two text inputs [In separates cell] and an anchor in the last cell, except the anchor I need to give to every input an unique iterative id, starting with the last in the table plus one :-)
I have this code, but I can't figure it out to create the elements, nor adding more cells [<td>]. So any help would be appreciated:
- $("#roomsTable").find('tbody')
- .append($('<tr>')
- .append($('<td>')
- .append($('<img>')
- .attr('src', '../../css/images/gen/ajax-loader-small.gif')
- .text('Image cell')
- )
- )
- );
Of course I don't want to add an image, is only to test it and it works fine, but as soon I replace the <img> with a $('input'), it just add all the inputs around !! :-S
So I've been trying all day, and couldn't do it :-(
I want to add four cells, and a select in the first [Wich I need to populate of course from the server], an input in the second and the third, and an anchor on the fourth ... Any help ??
Thanks in advance !!