i have a form and it validates and submit successfully. all i want is to call back function as "success" when the form has successfully submitted. here is what i have so far but no luck:
$(document).ready(function() {
$("#form1").validate({
rules: {
email1: {// compound rule
required: true,
email: true
}
)};
$('#form1').ajaxForm(function() {
alert("Thank you for your comment!");
//document.getElementById("popup").innerHTML = "Thank You!!"
});
});
here is my form input:
<input name="email1" size="22" type="text"/>
any ideas is greatly appreciated!