This is my first attempt to use the ideal form and i am facing a problem with the onsubmit function.
While it works as supposed to when there is an invalid field, the problem appears when all data is correct and i want to send the data to a page called new_ama.php.
The code is:
onSubmit: function(invalid, e) {
e.preventDefault();
if (invalid) {
alert(invalid +' fields!');
} else {
$.post('new_ama.php');
}
}
What am i doing wrong????