Here i will unchecked items in radio button list server control or check box list server control when we select on any item in this .For this i have used a singleitemcheck() function for each item in list control .This function makes functionality is very quick in your application
Aspx Page:
Java Script:
Aspx Page:
<asp:radiobuttonlist id="contentcheck" repeatdirection="Horizontal" runat="server"> <asp:listitem onclick="singleitemcheck(this);">Home</asp:listitem> <asp:listitem onclick="singleitemcheck(this);">Pages</asp:listitem> </asp:radiobuttonlist>
Java Script:
function singleitemcheck(ch) { var chkList = ch.parentNode.parentNode.parentNode; var chks = chkList.getElementsByTagName("input"); for (var i = 0; i < chks.length; i++) { if (chks[i] != ch&& ch.checked) { chks[i].checked = false;
No comments:
Post a Comment