i use front page to create website for my education in school, so when i run my website this error showed to me ligne:28 character:1 erreur: the value of the << indexOf >> property is null or not defined, not an object function
function verif() {
var a = f.T1.value;
var b = f.T2.value;
var c = f.T3.value;
var lettres = /^[A-Za-z]+$/;
var chiffres = /^[0-9]+$/;
var lett = a.charAt(0) + a.charAt(1);
var chiff = a.charAt(2) + a.charAt(3);
if (!(lett.match(lettres)) && !(chiff.match(chiffres))) {
alert("2 premier lettres alphabet et 2 autres chiffres");
return false;
}
if (!(b.match(lettres)) || b == "") {
alert("chaine alphabetique non vide");
return false;
}
if (!(c.match(lettres)) || c == "") {
alert("chaine alphabetique non vide 2");
return false;
}
var d = f.T4.value;
if (indexOf('@', d) == -1) {
alert("email invalid");
return false;
}
v1 = indexOf('@', d);
ch = substring(0, v1 - 1);
if (!(isNaN(ch))) {
alert("email invalid");
return false;
}
if (indexOf('.', d) == -1) {
alert("email invalid");
return false;
}
p2 = indexOf('.', ch);
ch1 = substring(p2 + 1, length(ch) - 1);
if (!(isNaN(ch1))) {
alert("email invalid");
return false;
}
p3 = indexOf('@', d);
p4 = indexOf('.', d);
v1 = substring(p3 + 1, p4 - 1);
if (!(isNaN(v1))) {
alert("email invalid");
return false;
}
}