Recently, I encountered an issue with my code that had been working perfectly fine in IE7 and IE8, but started giving me a runtime error in IE11. The error message stated: "JavaScript runtime error: 'SelectAllCheckboxes' is undefined"
Below is the snippet of my JavaScript code:
function SelectAllCheckboxes(spanChk) {
// Added as ASPX uses SPAN for checkbox
var oItem = spanChk.children;
var theBox = (spanChk.type == "checkbox") ? spanChk : spanChk.children.item[0];
xState = theBox.checked;
var theboxparentname = getparentname(theBox.name);
elm = theBox.form.elements;
for (i = 0; i < elm.length; i++) {
if (elm[i].type == "checkbox" && elm[i].id != theBox.id) {
if (theboxparentname == getparentname(elm[i].name)) {
if (elm[i].checked != xState) {
elm[i].click();
}
}
}
}
}
<HeaderTemplate>
<asp:CheckBox id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" AutoPostBack="false"
ToolTip="Select/Deselect All" runat="server" />
</HeaderTemplate>
I have attempted to resolve this issue by installing certain hotfixes, but I received an error stating: "KB2600088 does not apply, or is blocked by another condition on your computer". I am seeking advice or assistance as this problem persists in browsers IE9 and above.