I am trying to call a method from the constructor of my javascript constructor, is this possible and if so, I can't seem to get it working, any insight would be great! Thanks!
function ValidateFields(pFormID){
var aForm = document.getElementById(pFormID);
this.errArray = new Array();//error tracker
this.CreateErrorList();
}
/*
* CreateErrorList()
* Creates a list of errors:
* <ul id="form-errors">
* <li>
* You must provide an email.
* </li>
* </ul>
* returns nothing
*/
ValidateFields.prototype.CreateErrorList = function(formstatid){
console.log("Create Error List");
}
EDIT
I got it to work with what is above, but I can't seem to access the 'errArray' variable in CreateErrorList function.