Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #20032
| From | "Tony" <tony.johansson@inport.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | I want to use the passed argument to clear the table |
| Date | 2013-05-29 14:15 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ko4r9n$fuj$1@dont-email.me> (permalink) |
If I use this row
$("#myGrid tr:gt(0)").remove();
It works and all rows except the first one is removed in table with
id=myGrid
But if I use the passed argument which is myGrid in
this row
$("#" + tableID + "tr:gt(0)").remove();
it does't work.
How should I write ?
function CleanAllRows(tableID)
{
// $("#myGrid tr:gt(0)").remove();
$("#" + tableID + "tr:gt(0)").remove();
}
//tony
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
I want to use the passed argument to clear the table "Tony" <tony.johansson@inport.com> - 2013-05-29 14:15 +0200
Re: I want to use the passed argument to clear the table Christoph Becker <cmbecker69@gmx.de> - 2013-05-29 14:20 +0200
Re: I want to use the passed argument to clear the table "Tony" <tony.johansson@inport.com> - 2013-05-29 14:40 +0200
Re: I want to use the passed argument to clear the table Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-29 13:14 +0000
Re: I want to use the passed argument to clear the table "Tony" <tony.johansson@inport.com> - 2013-05-29 17:14 +0200
csiph-web