posted 18 years ago
Hi ,
I am displaying the bean values as:
<tr class="<%=styleClass%>" >
<td height="18"> <input type = "checkbox" value=<%=aerNo%>></td>
<td height="18"> <%=aer_no%></td>
<td height="18"> <%=selectVersionNo%></td>
<td height="18"> <%=latestVersionNo%></td>
</tr>
Here all the rows will be created dynamically.
I want to read the corresponding row which are all the checkbox's checked in that time of submit.
In the array checkedValue I have the values of corresponding checked check box values.
var j=0;
for(var i=0;i<document.SelectLatest.elements.length;i++)
{
if(document.SelectLatest.elements[i].type == 'checkbox' && document.SelectLatest.elements[i].checked == true)
{
checkedValue[j] = document.SelectLatest.elements[i].value;
j=j+1;
}
}
alert("checkedValue Length :"+checkedValue.length);
for(var i=0;i<noOfRows;i++)
{
var objCols=objRows[i].getElementsByTagName("td");
var aer_no = objCols.item(1).innerText;
for(var j=0;j<checkedValue.length;j++)
{
var checkedValue_t = checkedValue[j];
alert(checkedValue.item(j)+" "+" aer_no :"+aer_no );
if(checkedValue.item(j)==aer_no)
{
alert("From if.........");
}
}
Even though if I have the matches value in the abouve if condition its not entering in to that if block.
Please give me idea to read this corresponding row.
Eventhough if I try checkedValue[j] I am not getting