I have the following input control in an ASPX page:
<input tabindex="0" class="_f_ql _f_rl textbox allowTextSelection placeholderText" role="textbox" aria-labelledby="MailCompose.SubjectWellLabel" autoid="_f_B2"></input>
I am only able to inject JavaScript into this page, and check if an input element with the above class is present, and I would like to change the value of the text that is inside of this textbox. Is there any way to do this with JavaScript?
So far, I can get the correct element using the following code, but setting the value on it does not work to set the textbox's text to Testing...:
var subjectElements = getNodeElementsContainingID(document.body, "_f_ql _f_rl textbox allowTextSelection placeholderText");
if (subjectElements.length > 0) {
subjectElements[0].value = "Testing...";
}
I don't want to inject jQuery as its overkill, but seeing as how I have the element I need, what can I do to it to set the text value on it?