How to find control inside datalist in javascript
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 28, 2013, 5:28 AM EST
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