On an ASPX page, I have the following input
control:
<input tabindex="0" class="_f_ql _f_rl textbox allowTextSelection placeholderText" role="textbox" aria-labelledby="MailCompose.SubjectWellLabel" autoid="_f_B2"></input>
I am limited to injecting JavaScript into this page and need to change the text value inside this specific textbox
. Though I can identify the correct element using the code below, setting the value does not update the textbox
as expected with "Testing...":
var subjectElements = getNodeElementsContainingID(document.body, "_f_ql _f_rl textbox allowTextSelection placeholderText");
if (subjectElements.length > 0) {
subjectElements[0].value = "Testing...";
}
Avoiding jQuery due to its complexity, what other methods could be used to set the text value on this element once it's been identified?