Jquery form with file upload - onclick instead of dom ready
<pre><code> $("#form").submit(function() {
     $(this).ajaxSubmit({
         beforeSubmit: function(before) {
             $('.result').html('loading');
         },
         success: function(d) {
             //result process
         }
     }); 
     return false;
 });
</code></pre>

<p>When i click the submit button, This function works very good. But I would like to submit the form when a button is pressed. The above function is written in side</p>

<pre><code> $(document).ready(function() {
</code></pre>

<p>But i want to write it inside a normal javascript function.</p>

<p>I am using the form plugin. <strong>form.min.js</strong></p>
