How to post all the form values on button Click using Jquery and redirecting to other page after success post
<p>I have got below long html generated by .NET code.</p>

<pre><code>&lt;html&gt;
&lt;title&gt;Booking Form&lt;/title&gt;
&lt;body id="b2b"&gt;
&lt;form name="aspnetForm" method="post" action="index.aspx" id="aspnetForm"&gt;
&lt;div&gt;
        &lt;table class="stayingIn" width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
            &lt;td colspan="2" class="section topsection"&gt;
                &lt;span class="mandatoryExplanation"&gt;&lt;span class="asterisk"&gt;*&lt;/span&gt; Mandatory Fields&lt;/span&gt;
                &lt;h2&gt;
                    &lt;img src="/images/b2b/titles/aboutthetours.gif" alt="About The Tours" /&gt;&lt;/h2&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="type"&gt;
                &lt;label for="tour_whereStay" id="lblvalid12"&gt;
                    I will be staying in &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;&lt;/td&gt;
            &lt;td class="field"&gt;
            &lt;input name="ctl00$MainContent$TourBookingEnquiry$tour_Location" type="hidden" id="ctl00_MainContent_TourBookingEnquiry_tour_Location" /&gt;
                &lt;select class="isSelect" validid="12" id="tour_whereStay" &gt;

                    &lt;option value=""&gt;Please Select&lt;/option&gt;
                    &lt;option value="Dubai"&gt;Dubai&lt;/option&gt;
                    &lt;option value="AbuDhabi"&gt;Abu Dhabi&lt;/option&gt;
                    &lt;option value="Fujairah"&gt;Fujairah&lt;/option&gt;
                &lt;/select&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;            
    &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;      
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
                &lt;ul class="numPsgrCols plain clearfix"&gt;
                    &lt;li class="numPsgrField"&gt;
                        &lt;label for="car_guestAdults" id="lblvalid15"&gt;
                            Adults &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;
                        &lt;br /&gt;
                        &lt;select class="isSelect" id="car_guestAdults" validid="15"&gt;
                            &lt;option value=""&gt;-&lt;/option&gt;
                            &lt;option value="0"&gt;0&lt;/option&gt;
                            &lt;option value="1"&gt;1&lt;/option&gt;
                            &lt;option value="2"&gt;2&lt;/option&gt;
                        &lt;/select&gt;
                        &lt;br /&gt;
                        &lt;span&gt;(13 and older)&lt;/span&gt; &lt;/li&gt;

                    &lt;li class="numPsgrField"&gt;
                        &lt;label for="car_guestChildren"&gt;
                            Children&lt;/label&gt;
                        &lt;br /&gt;
                        &lt;select id="car_guestChildren"&gt;
                            &lt;option value=""&gt;-&lt;/option&gt;
                            &lt;option value="0"&gt;0&lt;/option&gt;

                            &lt;option value="1"&gt;1&lt;/option&gt;
                            &lt;option value="2"&gt;2&lt;/option&gt;
                        &lt;/select&gt;
                        &lt;br /&gt;
                        &lt;span&gt;(6-12 years)&lt;/span&gt; &lt;/li&gt;
                    &lt;li class="numPsgrField last"&gt;
                        &lt;label for="car_guestInfants"&gt;

                            Infants&lt;/label&gt;
                        &lt;br /&gt;
                        &lt;select id="car_guestInfants"&gt;
                            &lt;option value=""&gt;-&lt;/option&gt;
                            &lt;option value="0"&gt;0&lt;/option&gt;
                            &lt;option value="1"&gt;1&lt;/option&gt;
                            &lt;option value="2"&gt;2&lt;/option&gt;

                        &lt;/select&gt;
                        &lt;br /&gt;
                        &lt;span&gt;(5 and younger)&lt;/span&gt; &lt;/li&gt;
                &lt;/ul&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
            &lt;td colspan="2" class="section"&gt;
                &lt;h2&gt;
                    &lt;img src="/images/b2b/titles/aboutyou.gif" alt="About You" /&gt;&lt;/h2&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="type"&gt;
                &lt;label for="car_title" id="lblvalid1"&gt;

                    Title &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;select id="car_title" validid="1" class="isSelect"&gt;
                    &lt;option value="" selected&gt;-&lt;/option&gt;
                    &lt;option value="Mr."&gt;Mr.&lt;/option&gt;
                    &lt;option value="Mrs."&gt;Mrs.&lt;/option&gt;
                    &lt;option value="Ms."&gt;Ms.&lt;/option&gt;
                    &lt;option value="Miss"&gt;Miss&lt;/option&gt;
                    &lt;option value="Dr."&gt;Dr.&lt;/option&gt;
                    &lt;option value="Prof."&gt;Prof.&lt;/option&gt;                  
                &lt;/select&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="type"&gt;
                &lt;label for="car_firstname" id="lblvalid2"&gt;
                    First Name &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;ul class="aboutYouCols plain clearfix"&gt;
                    &lt;li class="field"&gt;
                        &lt;input class="text isBlank isAlphabet" validid="2" type="text" id="car_firstname"
                            maxlength="255" /&gt;
                    &lt;/li&gt;
                    &lt;li class="type"&gt;
                        &lt;label for="car_email" id="lblvalid7"&gt;
                            Email &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;
                    &lt;/li&gt;
                    &lt;li class="field last"&gt;
                        &lt;input class="text isEmail" validid="7" type="text" id="car_email" maxlength="255" /&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="type"&gt;

                &lt;label for="car_lastname" id="lblvalid3"&gt;
                    Last Name &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;&lt;/td&gt;
            &lt;td class="field"&gt;
                &lt;ul class="aboutYouCols plain clearfix"&gt;
                    &lt;li class="field"&gt;
                        &lt;input class="text isBlank isAlphabet" validid="3" type="text" id="car_lastname"
                            maxlength="255" /&gt;
                    &lt;/li&gt;
                    &lt;li class="type"&gt;

                        &lt;label for="car_email_confirm" id="lblvalid23"&gt;
                            Confirm Email &lt;span class="asterisk"&gt;*&lt;/span&gt;&lt;/label&gt;
                    &lt;/li&gt;
                    &lt;li class="field last"&gt;
                        &lt;input class="text isEmail isEqual_car_email" validid="23" type="text" id="car_email_confirm"
                            maxlength="255" /&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
            &lt;/td&gt;

        &lt;/tr&gt;    
    &lt;/table&gt;
    &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
            &lt;td colspan="2" class="section"&gt;
                &lt;input type="image" name="ctl00$MainContent$TourBookingEnquiry$rfp_Booking_submit" id="ctl00_MainContent_TourBookingEnquiry_rfp_Booking_submit" class="submit over2" src="/images/b2b/buttons/submit_off.gif" alt="Submit" style="border-width:0px;" /&gt;

            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/div&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>In above html I have got one button (see below code taken from above html) from which I want to post all the form values to other page and then it will redirected to another page on successfull ajax post call.</p>

<pre><code>&lt;input type="image" name="ctl00$MainContent$TourBookingEnquiry$rfp_Booking_submit" id="ctl00_MainContent_TourBookingEnquiry_rfp_Booking_submit" class="submit over2" src="/images/b2b/buttons/submit_off.gif" alt="Submit" style="border-width:0px;" /&gt;
</code></pre>

<p>Below is Jquery I am trying to write but getting failed.</p>

<pre><code>    $(document).ready(function() 
    {
        $("#&lt;%= rfp_Booking_submit.ClientID %&gt;").click(function(event)
        {            
$("#aspnetForm").submit(function(event)
            {                
       // setup some local variables
                            var $form = $(this);
                            // let's select and cache all the fields
                            $inputs = $form.find("input, select, button, textarea");
                            // serialize the data in the form
                            serializedData = $form.serialize();

                            // let's disable the inputs for the duration of the ajax request
                            $inputs.attr("disabled", "disabled");
                            alert("form data-"+serializedData);

                            // fire off the request to FormTest.html
                            $.ajax({
                                    url: "Email-TourBookingEnquiry.aspx",
                                    type: "post",
                                    data: serializedData,
                                    // callback handler that will be called on success
                                    success: function(response, textStatus, jqXHR)
                                    {
                                        // log a message to the console
                                        console.log("Hooray, it worked!");
                                        location.href = "Thank-You.aspx";
                                    },
                                    // callback handler that will be called on error
                                    error: function(jqXHR, textStatus, errorThrown)
                                    {
                                        // log the error to the console
                                        console.log("The following error occured: "+ textStatus, errorThrown);
                                    },
                                    // callback handler that will be called on completion
                                    // which means, either on success or error
                                    complete: function()
                                    {
                                        // enable the inputs
                                        $inputs.removeAttr("disabled");
                                    }
                            });
            // prevent default posting of form  
            event.preventDefault();
});
        });    
</code></pre>

<p>Please suggest what wrong I am doing as I am not able to post all the values.</p>

<p>Note: All the values in dropdown are filled using jquery on the basis of other dropdown selection.</p>
