I'm currently working on an autofill userscript where I require three fields to be filled automatically, I can achieve this much but the site doesn't register the fact that I've changed the fields - presumably because I've used JS to fill them.
Here is my code
var one = document.getElementById("t-1").innerHTML;
var two = document.getElementById("t-2").innerHTML;
var three = document.getElementById("t-3").innerHTML;
document.getElementById("text-1").value = one;
document.getElementById("text-2").value = two;
document.getElementById("text-3").value = three;
Can anyone recommend how I can make the text event fire? I'm aware that the site uses jQuery so I'd imagine that it's something to do with that.
EDIT: I know the event isn't fired because there are three images of crosses which change green when the site registers the input as valid.
Code snippet I believe they use for detection:
$("input[type=text]").on("propertychange change keyup paste input",function(){validate($(this).attr('id'))});