How to submit the main form on the click of button in JQuery Dialog Box
<p>I am using JQuery to submit the form.</p>

<p>I have got the below HTML:</p>

<pre><code>&lt;body&gt;
    &lt;div id="wrapper"&gt;
        &lt;form id="aspnetForm" action="index_2011.aspx" method="post"&gt;
            &lt;div action="#" class="homeWidget"&gt;
                &lt;fieldset&gt;       
                    &lt;div class="row"&gt;
                        &lt;label class="first" for="olciLastName"&gt;
                            Last name&lt;/label&gt;
                        &lt;input class="input" id="olciLastName" value="" type="text"&gt;
                        &lt;div class="clearBoth"&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="row"&gt;
                        &lt;label class="first" for="olciItinerary"&gt;
                            Itinerary number&lt;/label&gt;
                        &lt;input class="input itineraryNumber" id="olciItinerary" value="" type="text"&gt;
                        &lt;a href="#" class="ico-help"&gt;help&lt;/a&gt;
                        &lt;div class="clearBoth"&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="row submit"&gt;
                        &lt;span class="form-btn"&gt;
                            &lt;input class="submitButton" value="Retrieve Booking" type="button"&gt;&lt;/span&gt;
                        &lt;div class="clearBoth"&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;      
            &lt;!-- SKYWARDS LOGIN --&gt;
            &lt;div style="display: none;" id="skywardsLogin"&gt;
                &lt;div class="formContainer" id="loginDetails"&gt;
                    &lt;table cellspacing="0" cellpadding="0" border="0"&gt;
                        &lt;tbody&gt;&lt;tr&gt;
                            &lt;td colspan="2" class="formLabel"&gt;
                                &lt;span style="color: Red;" class="validateTips"&gt;&lt;/span&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td width="100" class="formLabel"&gt;
                                &lt;label&gt;Skywards Number&lt;/label&gt;
                            &lt;/td&gt;           
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td class="formLabel"&gt;
                                &lt;label&gt;Password&lt;/label&gt;
                            &lt;/td&gt;
                            &lt;td&gt;
                                &lt;input type="password" class="formField" id="password" maxlength="25" name="password"&gt;
                            &lt;/td&gt;               
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td class="formLabel"&gt;
                                &lt;label&gt;Remember Me&lt;/label&gt;
                            &lt;/td&gt;               
                        &lt;/tr&gt;
                    &lt;/tbody&gt;&lt;/table&gt;
                &lt;/div&gt;
                    &lt;div class="continueBarRightButton"&gt;
                        &lt;input type="image" title="Log In" alt="Log In" id="loginButton" name="loginButton" src="/english/images/button_log_in_tcm233-224930.gif"&gt;
                        &lt;div style="display: none;" id="ajaxloading"&gt;
                            &lt;img align="absmiddle" alt="Processing..." src="/english/images/spinner.gif"&gt;
                             Processing...
                        &lt;/div&gt;
                    &lt;/div&gt;
            &lt;/div&gt;  
        &lt;/form&gt;     
    &lt;/div&gt;  
&lt;/body&gt;
</code></pre>

<p>If you see the above HTML, I have got  with ID <strong>skywardsLogin</strong>, Which will work as JQuery Modal Dialog, as if what I know and see that when JQuery <strong>.Dialog</strong> function is called it <strong>tooks all the related HTML</strong> out from the <strong>FORM</strong> tag, my problem is that I want to submit the form of the click of login button <strong>("loginButton")</strong>, I know how to submit the FORM, however question is that I am not getting complete FORM element values when I am doing the submit, below is the Jquery example code which I am using to submit the form.</p>

<pre><code>$("#aspnetForm").attr("action", "http://localhost:8080/english/index_2011.aspx");
$("#aspnetForm").submit();
</code></pre>

<p>I have already checked using serialize, but not getting any form values</p>

<pre><code> var str = $('#aspnetForm').serialize();   
        // -- Start AJAX Call --
 alert(str);
</code></pre>

<p>Above <strong>ALERT</strong> is not showing any entered values in the form.
Please suggest!</p>
