How can I change the value of a textarea field using javascript to trigger button disable change?

  forms, html, javascript, ui-automation

I wrote an automation script for filling out these mundane forms at work and everything seems to work except for the textarea part where I’m successfully able to update the value in the field using

var textarea = document.getElementById('c4d981e9a2c98b0483252333_input'); 
textarea.value = 'hi';

But this doesn’t register in the code as the submit button is still disabled and I need to manually paste the text into the box for it to become clickable. Is there a way to write the function so changing the value of the text area actually adds the text with the cursor in the textarea box (replicates typing) in order to make the submit button clickable again?

Source: Ask Javascript Questions