Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8839233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:11:38+00:00 2026-06-14T10:11:38+00:00

jQuery 1.7.2 jQuery Validate 1.1.0 jQuery Form 3.18 WordPress 3.4.2 I am trying to

  • 0
  • jQuery 1.7.2
  • jQuery Validate 1.1.0
  • jQuery Form 3.18
  • WordPress 3.4.2

I am trying to code a contact/ mail form in above environment/ with above jQuery libs. Now I am having a problem with the jQuery Form JS:

I have taken the original code from the developers page for ajaxSubmit and only altered the target option to an ID which exists in my HTML source and replaced $ with jQuery in function showRequest.

The problem is, that the function named after success: does not fire. I tried the same with error: and again nothing fired.

Only complete: did and the function I placed there alerted the responseText from the receiving script.

Does anyone has an idea whats going wrong?

Code:

jQuery(document).ready(function() {
var options = { 
    target:        '#mail-status',   // target element(s) to be updated with server response 
    beforeSubmit:  showRequest,  // pre-submit callback 
    success:       showResponse,  // post-submit callback 

    // other available options: 
    //url:       url         // override for form's 'action' attribute 
    //type:      type        // 'get' or 'post', override for form's 'method' attribute 
    //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
    //clearForm: true        // clear all form fields after successful submit 
    //resetForm: true        // reset the form after successful submit 

    // $.ajax options can be used here too, for example: 
    //timeout:   3000 
};
jQuery("#mailform").validate(
{
    submitHandler: function(form)   { jQuery(form).ajaxSubmit(options); },
    errorPlacement: function(error, element) { },
    rules: {
        author: {
            minlength: 2,
            required: true
        },
        email: {
            required: true,
            email: true
        },
        comment: {
            minlength: 2,
            required: true
        }
    },
    highlight: function(element) 
    {
        jQuery(element).addClass("e");
        jQuery(element.form).find("label[for=" + element.id + "]").addClass("e");
    },
    unhighlight: function(element) 
    {
        jQuery(element).removeClass("e");
        jQuery(element.form).find("label[for=" + element.id + "]").removeClass("e");
    }
});
});
// pre-submit callback 
function showRequest(formData, jqForm, options) { 
// formData is an array; here we use $.param to convert it to a string to display it 
// but the form plugin does this for you automatically when it submits the data 
var queryString = jQuery.param(formData); 

// jqForm is a jQuery object encapsulating the form element.  To access the 
// DOM element for the form do this: 
// var formElement = jqForm[0]; 

alert('About to submit: \n\n' + queryString); 

// here we could return false to prevent the form from being submitted; 
// returning anything other than false will allow the form submit to continue 
return true; 
} 
// post-submit callback 
function showResponse(responseText, statusText, xhr, $form)  { 
// for normal html responses, the first argument to the success callback 
// is the XMLHttpRequest object's responseText property 

// if the ajaxSubmit method was passed an Options Object with the dataType 
// property set to 'xml' then the first argument to the success callback 
// is the XMLHttpRequest object's responseXML property 

// if the ajaxSubmit method was passed an Options Object with the dataType 
// property set to 'json' then the first argument to the success callback 
// is the json data object returned by the server 

alert('status: ' + statusText + '\n\nresponseText: \n' + responseText + 
    '\n\nThe output div should have already been updated with the responseText.'); 
} 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:11:39+00:00Added an answer on June 14, 2026 at 10:11 am

    See if the validation succeeds and jQuery(form).ajaxSubmit(options); is invoked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to validate a form using jquery validate plugin and I'm having a
I have the following form. I am trying to validate the inputs using jquery
I am trying to validate a form with the jquery-validate plugin. The html page
I'm try to validate form using jquery validation plugin my from code: source code
I have a simple login form and have jQuery validate replacing the field labels
I am trying to using a jquery.validate.unotrusive.js plugin to dynamically created form fields like:
i have a jquery validate setup on the form. whil the form is being
I'm using the jQuery Validation plugin with Wordpress to validate my contact page. I
I've seen examples of using jquery.validate to validate form fields but I have a
I am using jQuery validate to validate a form. I have two text boxes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.