So I have this code.
class Validationator
{
constructor()
{
this.initValidation()
}
initValidation()
{
window.addEventListener("load", this.PerformOnLoad, false);
}
PerformOnLoad()
{
var form = document.querySelector("#feedbackcontainer");
form.addEventListener("onsubmit", this.SubmitClicked);
}
SubmitClicked()
{
alert("asdf");
}
}
I have tried using both 'submit' and 'onsubmit' and neither are working. I have verified that the query selector is grabbing the proper form. Pardon my being a beginner at Javascript. Event handlers keep defeating me.