Does jquery have a way to tell if a form is successful or unsuccessful after it has been submitted?

Source: Internet
Author: User
Specifically, today in the project to use the layer pop-up plug-in, I popped an iframe layer. I used the AJAX submission, the callback after the AJAX submission to determine whether the success of the submission, the success of the call Parent.layer.close (index), close the popup box and refresh the current page outside to get the latest data.

But the problem is, now I need to add a form validation, I'm going to use jquery validate to do the validation, but I submit it with Ajax, not through the form tag. So I want to ask you how you can tell if a form is successful or unsuccessful after it's submitted.

Form at:

                                                        User group name:                                             Enter a user group name, not less than 3 words                                                                        Parent group Name:                                            {$a} please drop down to select the parent of the group, if the group does not belong to the superior, then select the most superior                                                                        detailed description of the group:                                            <textarea id="description" name="description" placeholder="输入组详细说明" style="height: 120px; width: 640px">{$info. Description}</textarea>                                                                    SubmitJS Ajax Submission

Reply content:

Specifically, today in the project to use the layer pop-up plug-in, I popped an iframe layer. I used the AJAX submission, the callback after the AJAX submission to determine whether the success of the submission, the success of the call Parent.layer.close (index), close the popup box and refresh the current page outside to get the latest data.

But the problem is, now I need to add a form validation, I'm going to use jquery validate to do the validation, but I submit it with Ajax, not through the form tag. So I want to ask you how you can tell if a form is successful or unsuccessful after it's submitted.

Form at:

                                                        User group name:                                             Enter a user group name, not less than 3 words                                                                        Parent group Name:                                            {$a} please drop down to select the parent of the group, if the group does not belong to the superior, then select the most superior                                                                        detailed description of the group:                                            <textarea id="description" name="description" placeholder="输入组详细说明" style="height: 120px; width: 640px">{$info. Description}</textarea>                                                                    SubmitJS Ajax Submission

Ajax can also submit a form.

After the form is submitted, according to the database operation results, determine, jump to which page, success or failure

Depending on the AJAX request data, the returned results can be judged

Sucess can determine whether the AJAX data is transferred smoothly to the server, the data returned by the server to determine whether the server successfully processed

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.