开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜