<table id="GridView1">
<tr>
<th>KeyWord</th>
<th>Identifiers</th>
<th>Values</th>
</tr>
<tr>
<td>
<select >
<option selected="selected" value="Action A">Action A</option>
<option value="Action b">Action b</option>
<option value="Action C">Action C</option>
</select>
</td>
<td>
<textarea >adsasd</textarea>
</td>
<td>
<textarea >dsad</textarea>
</td>
</tr>
<tr>
<td>
<select >
<option value="Action A">Action A</option>
<option selected="selected" value="Action b">Action b</option>
<option value="Action C">Action C</option>
</select>
</td>
<td>
<textarea >asdasd</textarea>
</td>
<td>
<textarea >sdsad</textarea>
</td>
</tr>
</table>
This is the js.
var xml = '<?xml version="1.0" encoding="utf-8"?>';
xml = xml + '<Root>';
i=0;
$("#GridView1 tr").each(function () {
$(this).find('td').each (function() {
alert($(this).find('select').val())
alert($(this).find('textarea').val())
});
});
xml = xml + '</Root>'
alert(xml)
I am getting all the values inside the td but also getting undefined. Any idea why ?