I am getting an error in IE11 when attempting to call a function that is executing on click in a radio button.
Here is the html for the radio button:
<input type="radio" name="filter" value="status" onclick="status()" checked>
The function is defined at the bottom of the page:
function status(){
try{
var td = document.getElementById("check1td");
td.innerHTML = "Current (CURR)<input type=\"checkbox\" name=\"skustat1\" value=\"CURR\" checked>";
td = document.getElementById("check2td");
td.innerHTML = "Test (TEST)<input type=\"checkbox\" name=\"skustat2\" value=\"TEST\" checked>";
td = document.getElementById("check3td");
td.innerHTML = "Stocking Internet (SINET)<input type=\"checkbox\" name=\"skustat3\" value=\"SINET\" checked>";
td = document.getElementById("check4td");
td.innerHTML = "Sellable Display (SLDSP)<input type=\"checkbox\" name=\"skustat4\" value=\"SLDSP\" checked>";
}
catch(err){
alert(err.message);
}
}
I have a similarly defined function on the sibling radio button and it is called correctly. So, my question is, is status()
a reserved javascript function that IE won't respond to? And, if so, why does this work in other browsers?
EDIT: changed Status() to status() to reflect how it actually appears in my code.
UPDATE1: It also seems that it works when the browser is first opened in IE, maybe a caching issue?