javascript - How can I re-enable a text field? -


i trying re-enable text field gets automatically filled in , disabled on website use ticketing. possible inspect element, , enable manually field enter want. i'd remove step. trying make (very) simple chrome extension detect when field has been disabled , switch on, i'm having no luck.

i've tried several iterations, no success. here's i've got @ moment.

var subject = document.getelementbyid('title_fs'); subject.onchange = function() {fix()} function fix(){     subject.setattribute("enabled", true)} 

i tried

var subject = document.getelementbyid('title_fs'); subject.addeventlistener("change", {subject.setattribute("disabled", false)}); 

the success i've had far accidentally disabling field page loaded. suggestions?

simply remove attribute

document.getelementbyid('title_fs').removeattribute('disabled'); 

document.getelementbyid('removedisabled').addeventlistener('click', function() {    document.getelementbyid('title_fs').removeattribute('disabled');  });
<textarea disabled="true" id="title_fs">foobar</textarea>  <button id="removedisabled">remove disabled</button>


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -