how to unable input text in JS
document.getElementById('TextBoxID').readOnly = true; //to enable readonly document.getElementById('TextBoxID').readOnly = false; //to disable readonly
Source: stackoverflow.com
document.getElementById('TextBoxID').readOnly = true; //to enable readonly document.getElementById('TextBoxID').readOnly = false; //to disable readonly