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 7722361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:09:06+00:00 2026-06-01T04:09:06+00:00

Hi everyone I was using the jQuery form plugin to process form submission (found

  • 0

Hi everyone I was using the jQuery form plugin to process form submission (found at http://malsup.github.com/jquery.form.js) on my page but now have to switch to using an purely jQuery AJAX based method (without using any the form plugin but I can use jQuery). What would be the best method of achieving this? I’m having difficulty translating it across. What would an ideal solution look like?

This is the code I’m using at the moment below:

// prepare the form when the DOM is ready 

$(document).ready(function() { 
var options = { 
    target:        '#result',  
    beforeSubmit:  showRequest,  
    success:       showResponse   
}; 

// bind to the form's submit event 

$('#booking').submit(function() { 
    $(this).ajaxSubmit(options); 
    return false; 
    }); 
});  

// pre-submit callback 

function showRequest(formData, jqForm, options) { 
    var queryString = $.param(formData); 
    // alert('About to submit: \n\n' + queryString); 
}

// post-submit callback 

function showResponse(responseText, statusText, xhr, $form)  {
    $('#last-step').fadeOut(300, function() {
    $('#result').html(responseText).fadeIn(300);
    });
}
  • 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-01T04:09:08+00:00Added an answer on June 1, 2026 at 4:09 am

    You can do something like this:

    $.ajax({
        url: 'process.php',
        data: $('form[name="booking"]').serialize(),
        dataType: 'html',
        type: 'POST',
        success: function(data) {
            $('#last-step').fadeOut(300, function() { $('#result').html(data).fadeIn(300);
        },
        complete: function (data) {
            // your code here
        },
        error: function (url, XMLHttpRequest, textStatus, errorThrown) {
            alert("Error: " + errorThrown);
        }
    });
    
    • The data param, can be something like this: ‘param1=value1&param2=value2&param3=value3’
    • type can be: POST or GET
    • dataType can be: json, html, xml..

    For more information, refer to this url: http://api.jquery.com/jQuery.ajax/

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

Sidebar

Related Questions

I am using a jQuery Multi-Friend Selector form this site; http://mike.brevoort.com/2010/08/10/introducing-the-jquery-facebook-multi-friend-selector-plugin/ And it works
What is everyone's favorite way to sanitize user data? I've been using Javascript, but
Good day everyone, I am building a page in ASP.NET, and using Master Pages
I am using jQuizMe, the jQuery plugin for quizzes, and I want to get
i'm newbie at web developing. i have some input form.i'm using jquery 1.4.2 inside
Well I have a very rough version of gomoku working now. I'm using Jquery,
I'm using jQuery, and I'd like to make it so that a form submit
Hey everyone. I saw another post on using a specific jQuery UI tab to
I am using Wordpress with JQuery to create a vehicle selection form. Vehicle information
I have built two control containers on a page, one is using jquery-ui tabs

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.