Submit file upload/form on file selection
<p>I'd like to take my form below, and somehow adjust it to submit the form when the user selects a file. How can I do that?</p>

<pre><code>&lt;div id=uploadform style="width:500px;margin-left:auto;margin-right:auto;"&gt;
    &lt;form enctype="multipart/form-data" action='' method='POST'&gt; 
        &lt;input type="file" name="imagefile" class=browse&gt;
        &lt;input type='submit' value='Upload' class=uploadsubmit onClick="if($('#loading').css('display') == 'none') { $('#loading').show('fast'); $(this).hide('fast'); };"&gt;
        &lt;input type='hidden' value='1' name='submitted' /&gt; 
    &lt;/form&gt; 
&lt;/div&gt;
&lt;div id=loading style="display:none;"&gt;
    &lt;img src=uploading.gif&gt;
&lt;/div&gt;
</code></pre>

<p>Since the button will be absent(ideally), how can I still show my image loading layer after submit?</p>

<p>To clarify, I want the submit button itself gone, and when the user selects a file, submit the form and show the #loading layer.</p>
