[AS]on (release) {
if (!form.length || form.indexOf("@") == -1 || form.indexOf(".") == -1) {
message = "Please enter a valid E-mail address";
} else {
loadVariablesNum("mail.php", "0", "POST");
message = "Sending...";
}
}
[/AS]
even when its a valid email address it still gives the invalid email message. any ideas?
system
2
on (release) {
if (form.length && form.indexOf("@") != -1 && form.indexOf(".") != -1) {
loadVariablesNum("mail.php", "0", "POST");
message = "Sending...";
} else {
message = "Please enter a valid E-mail address";
}
}
system
5
And who said we’ve lost the art of conversation :beam:
system
6
in cases such as this, use trace() to find out what happens:
trace(form.indexOf("@"));
see what you get with both valid/invalid email…
DEBUG!