Jquery and jQuery-Validation-Engine
I am using jQuery-Validation-Engine found at GitHub and it is working good, but I can't manage one thing ,after form is submitted to create action. Code so far:
jQuery(document).ready(function(){
jQuery("#contact-form").validationEngine({
ajaxFormValidation: true,
onSuccess: function(){
alert(1);
}
});
});
This is working(data is written into db) but there is no alert. I also tried with onAjaxFormComplete but again nothing. Does someone 开发者_如何学运维have experience with this plugin?
Could you try this:
jQuery(document).ready(function(){
jQuery("#contact-form").validationEngine('attach', {
ajaxFormValidation: true,
onAjaxFormComplete: function(form, status){
alert("The form status is: " +status);
}
});
});
Also remember than on the SUBMIT page(where you send it to the database), you need to gerenate a repsonse back -if the form was submitted or not (true/false).
See: https://github.com/posabsolute/jQuery-Validation-Engine/blob/master/demos/phpajax/ajaxValidateSubmit.php
精彩评论