how to find control inside datalist in javascript
how to find control inside datalist in javascript
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Nov 28, 2013, 10:28 AM
var lst = document.getElementById('<%=dlService.ClientID%>');
for(var i=0;i< lst.rows.length;i++){
var elements = lst.rows[i].getElementsByTagName('span');
if(elements.length>0){
if(elements[0].innerHTML == desc)
{
alert('Matched');
break;
}
}
}
http://forums.asp.net/t/1770161.aspx
http://stackoverflow.com/questions/19679928/find-control-inside-datalist-using-javascript