title: Call function on submit of ajax form
body: <p>I'm using the ajaxForm.js to make an ajax image upload.</p>
  
  <p>this is the js function I use:</p>
  
  <pre><code>$(document).ready(function() {
      $('#photoimg').live('change', function() {
          $("#hd_pic").html('');
          $("#loading").html('&lt;img src="../img/common/loader.gif"/&gt;').fadeIn(250);
          $("#imageform").ajaxForm({
              target: '#hd_pic'  
          }).submit();
      });
  });
  </code></pre>
  
  <p>I don't want to output the result to target: '#hd_pic', but I want to call a function. For example, I do it this way in my ajax call:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/ajax/add_url.php",
      data: dataString,
  }).done(function(result) {
      myresult(result);
  });​
  </code></pre>
  
  <p>I call the function myresult and I use the result of the ajax call. I also want to do this in the ajaxform submit function. Is it possible to do this?</p>
  
  <p>This doesn't work:</p>
  
  <pre><code>        $("#imageform").ajaxForm({
          success: myresult(result)
      }).submit();
  </code></pre>