I have few tables on the page and I need to run a loop to get all column values and save them in a comma separated string (I will pass these strings to hidden fields of ASP.NET page). How can I write a loop so that it can read column values from let’s say “Route1” table. Unfortunately I cannot rely on #ID for TR and TD just because users can shuffle them from one table to anothor using (jQuery).
To put it simple, how I can I write a loop to read through column values of the following table
<table ID = "Route1">
<tr>
<td>row 1 col1</td> <td> row1 col2 </td>
</tr>
<tr>
<td>row 1 col1</td> <td> row1 col2 </td>
</tr>
</table>
<table ID = "Route2">
<tr>
<td>row 1 col1</td> <td> row1 col2 </td>
</tr>
<tr>
<td>row 1 col1</td> <td> row1 col2 </td>
</tr>
</table>
Demo : http://jsfiddle.net/2xpFZ/