This variable represents a input where the type=text

```
var x=document.getElementById('fiber-count');

```

I have this function: 

```
x.onkeyup=function(){
var u=x.value;
var v=parseInt(u);
var n=isNaN(u);

if(n){
    this.setAttribute('placeholder', 'Invalid Character');

    setTimeout(function(){this.setAttribute('placeholder','');},3000);
    x.value="";

}
if(v<1){
    this.setAttribute('placeholder', "Min. value is 1");
    setTimeout(function(){this.setAttribute('placeholder','');},3000);
    x.value='';
}
if(v>864){
    this.setAttribute('placeholder', 'Max. value is 864');
    setTimeout(function(){this.setAttribute('placeholder','');},3000);
    x.value='';
};

if(v<=12&&v>=1){
    tr.removeAttribute('disabled');
}else{
    tr.setAttribute('disabled', 'disabled');
}

if(v==2){
    swr.removeAttribute('disabled');
}else{
    swr.setAttribute('disabled', 'disabled');
}
if(v!==2){
    document.getElementById('cable_type').selectedIndex='0';
    f_c.classList.remove('hidden');
    var top=document.getElementsByName('subunit');
    for(i=0; i<top.length; i++){
        top[i].removeAttribute('disabled');
    }

}
if(v==1){
    document.getElementById('radio_option_1').checked=true;
}
if(v==12&&bast[0].checked){
    document.getElementById('diameter').selectedIndex='3';
}
if(v>=12||v==8){
    document.getElementById('sub_four').removeAttribute('disabled');
    console.log('ribbon ought to be enabled');
}else{
    //document.getElementById('sub_four').setAttribute('disabled',    'disabled');
    document.getElementById('sub_four').setAttribute('disabled', 'disabled');
    console.log('ribbon disabled')
}
};

```

The problem is this: none of the setAttribute() methods are working in IE. I can't figure out why. I am using the setAttribute() method to set the placeholder and disabled attributes of several elements. The problem is this: I get this error message when I type 12 into the input.

[![My error message](https://i.stack.imgur.com/SgQfO.png)](https://i.stack.imgur.com/SgQfO.png)

I've tried to use the property notation

```
element.disabled=true;

```

but that doesn't seem to work, as if setting it via the property notation doesn't immediately update it or something. I'd post a fiddle, but that wouldn't work because this bug only occurs in IE, so JSFiddle wouldn't replicate it. 

Is there any way that I can correct this? A polyfill maybe? Please no Jquery.