.submit() without reloading page
<p>I am trying do some file upload using jquery. The upload box have to be in the dialog box.
Now I just want to know after I click on the dialog's upload button. How can I submit yet the page do not load.
I tried using this
$('#uploadForm').submit().preventDefault();
It has not action at all.</p>

<p><strong>html</strong></p>

<pre><code>&lt;script&gt;
                $( "#dialog-upload" ).dialog({
                autoOpen: false,
                height: 200,
                width: 350,
                modal: true,
                buttons: {
                "Upload": function() {                  
                    var bValid = true;
                    bValid = bValid &amp;&amp; checkCSV()
                    if(bValid){
                        **$('#uploadForm').submit().preventDefault();**

                        }
                $( "#dialog-upload" ).dialog( "close" );
                        },
            Cancel: function() {                
                allFields.val( "" ).removeClass( "ui-state-error" );
                $( this ).dialog( "close" );
            }
                },
            close: function() {
                allFields.val( "" ).removeClass( "ui-state-error" );
                $( this ).dialog( "close" );    

                }
                });
&lt;/script&gt;

  &lt;div id="dialog-upload" title="Upload csv file"&gt;
    &lt;form&gt;
    &lt;fieldset&gt;
        &lt;form action='ajax.php' id = 'uploadForm' method='post' enctype='multipart/form-data'&gt;
        &lt;input type="text" name="file" id="fileUpload" size = 30 class="text ui-corner-all" /&gt;
        &lt;/form&gt;
    &lt;/fieldset&gt; 

    &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p><strong>php</strong></p>

<pre><code>if (isset($_FILES['file'])) {
echo "success";
}
</code></pre>
